From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29750 invoked from network); 26 Nov 2002 13:06:16 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 26 Nov 2002 13:06:16 -0000 Received: (qmail 4403 invoked by alias); 26 Nov 2002 13:05:56 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5533 Received: (qmail 4383 invoked from network); 26 Nov 2002 13:05:53 -0000 To: zsh-users@sunsite.dk Cc: dominik.vogt@gmx.de Subject: Re: why does "jobs | wc" not work? In-reply-to: "Dominik Vogt"'s message of "Tue, 26 Nov 2002 13:48:14 +0100." <20021126124814.GH1937@gmx.de> Date: Tue, 26 Nov 2002 13:05:21 +0000 Message-ID: <29376.1038315921@csr.com> From: Peter Stephenson Dominik Vogt wrote: > From a user's point of view I think it would be better to fork the > right hand side of the pipe. This way, the left hand side always > generates the same output, regardless of the context in which it > is used. If you look in the completion system, you will see various places where we do stuff on the lines of output_some_values | while read line; ... in order to process values for the current shell, and very few where we need to output transient data from shell builtins. I think jobs is the only common case. > In my eyes, > the real flaw lies in the design of the jobs command. Commands > printing information about the current shell should not rely on > design choices inherent to the shell. Surely that's the one thing they have got to rely on :-). The basic problem is that job control relies on the process structure of UNIX. There is no way this can be completely hidden from the user, nor should it be or it will be useless for its job of dealing with multiple processes efficiently. I agree it could have been better documented, it's not at all obvious without some prior knowledge of the architecture. -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. **********************************************************************