From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29273 invoked from network); 26 Nov 2002 12:00:29 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 26 Nov 2002 12:00:29 -0000 Received: (qmail 9571 invoked by alias); 26 Nov 2002 12:00:00 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5526 Received: (qmail 9543 invoked from network); 26 Nov 2002 11:59:56 -0000 X-Amavix: Anti-spam check done by SpamAssassin X-Amavix: Anti-virus check done by McAfee X-Amavix: Scanned by Amavix X-Authentication-Warning: greux.loria.fr: lefevre set sender to vincent@vinc17.org using -f Date: Tue, 26 Nov 2002 12:59:26 +0100 From: Vincent Lefevre To: zsh-users@sunsite.dk Subject: Re: why does "jobs | wc" not work? Message-ID: <20021126115926.GH27620@greux.loria.fr> Mail-Followup-To: zsh-users@sunsite.dk References: <20021126104930.GE1937@gmx.de> <18744.1038308955@csr.com> <20021126114222.GG1937@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20021126114222.GG1937@gmx.de> X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.1i On Tue, Nov 26, 2002 at 12:42:22 +0100, Dominik Vogt wrote: > On Tue, Nov 26, 2002 at 11:09:15AM +0000, Peter Stephenson wrote: > > In zsh > > > > jobs | anything > > > > causes the shell to fork for the left hand side of the pipeline. > > Um, why must builtin commands run in a subshell? I would have > naively thought commands like "echo something | ..." would just > run in the current shell. Spawning a subshell sounds a bit > inefficient. On the contrary, both commands can run asynchronously. Thus, this is more efficient, well at least for commands that take time. -- Vincent Lefèvre - Web: - 100% validated (X)HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des Jeux Mathématiques et Logiques, TETRHEX, etc. Work: CR INRIA - computer arithmetic / SPACES project at LORIA