Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site umcp-cs.UUCP Path: utzoo!watmath!clyde!burl!ulysses!harpo!seismo!rlgvax!cvl!umcp-cs!chris From: chris@umcp-cs.UUCP Newsgroups: net.unix-wizards Subject: Re: csh bug with the 'jobs' command Message-ID: <6862@umcp-cs.UUCP> Date: Wed, 2-May-84 21:57:25 EDT Article-I.D.: umcp-cs.6862 Posted: Wed May 2 21:57:25 1984 Date-Received: Fri, 4-May-84 03:04:40 EDT References: <233@sri-arpa.UUCP> Organization: Univ. of Maryland, Computer Science Dept. Lines: 26 It's not precisely a bug, more a problem of definitions: jobs | cat essentially starts a subshell (it actually tries hard not to, but I'm not sure whether it succeeds) whose output is sent into a pipe to 'cat'. This subshell has no "jobs" running, so no output. More interesting is the bug in the job-printing routine that prints "< ^A > ^A" for double &s in a job. The job itself is remembered correctly; the print routine is wrong. Still more interesting, some commands misbehave when piped. This appears to be due to csh's attempts not to fork. 'echo | echo' produces "Reset tty pgrp from to ". A subsequent 'jobs' command prints '[1] Done echo |', but this will never be printed by itself (i.e. you *must* use the jobs command), probably because no child-exit signal is ever received. The C-shell is an interesting example in how not to write code. The user interface is fine (well, not too bad, at least :->), and the program usually works, but O what a mess it is inside! -- In-Real-Life: Chris Torek, Univ of MD Comp Sci (301) 454-7690 UUCP: {seismo,allegra,brl-bmd}!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@maryland