From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3357 invoked from network); 13 Feb 2004 16:13:16 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 13 Feb 2004 16:13:16 -0000 Received: (qmail 16271 invoked by alias); 13 Feb 2004 16:12:53 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7050 Received: (qmail 16260 invoked from network); 13 Feb 2004 16:12:53 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 13 Feb 2004 16:12:53 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.189.58.19] by sunsite.dk (MessageWall 1.0.8) with SMTP; 13 Feb 2004 16:12:53 -0000 Received: from MAILSWEEPER01.csr.com (mailhost1.csr.com [62.189.183.235]) by lhuumrelay3.lnd.ops.eu.uu.net (8.11.0/8.11.0) with ESMTP id i1DGCqv04821 for ; Fri, 13 Feb 2004 16:12:52 GMT Received: from EXCHANGE02.csr.com (unverified [192.168.137.45]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Fri, 13 Feb 2004 16:12:36 +0000 Received: from tinky-winky ([192.168.144.127]) by EXCHANGE02.csr.com with Microsoft SMTPSVC (5.0.2195.5329); Fri, 13 Feb 2004 16:13:40 +0000 Date: Fri, 13 Feb 2004 16:12:51 +0000 From: Peter Stephenson To: zsh-users@sunsite.dk Subject: Re: |& loses data (buffering bug?) Message-Id: <20040213161251.2588a9f2@tinky-winky> In-Reply-To: <20040213154409.GL27168@greux.loria.fr> References: <20040213141505.GG27168@greux.loria.fr> <20040213143359.4ed3c3e5@tinky-winky> <20040213144311.GJ27168@greux.loria.fr> <20040213150016.1e64a843@tinky-winky> <20040213153031.GK27168@greux.loria.fr> <20040213154409.GL27168@greux.loria.fr> Organization: Cambridge Silicon Radio Ltd. X-Mailer: Sylpheed version 0.9.9claws (GTK+ 1.2.10; sparc-sun-solaris2.8) Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 13 Feb 2004 16:13:40.0249 (UTC) FILETIME=[57E3D090:01C3F24C] On Fri, 13 Feb 2004 16:44:09 +0100 Vincent Lefevre wrote: > On 2004-02-13 16:30:31 +0100, Vincent Lefevre wrote: > > On 2004-02-13 15:00:16 +0000, Peter Stephenson wrote: > > > Can you get the same effect with e.g. > > > > > > perl -e 'open STDERR, ">&STDOUT"; > > > open STDIN, "cvs status|"; > > > > > > exec "less";' > > > > > > which doesn't involve zsh at all? > > In fact, it doesn't do the same thing: STDERR is redirected to the > terminal here. You're right, the output from less is being redirected, not the output to less. Also, the tricks with pipes don't quite match what zsh is doing. That's something more like: perl -e 'pipe PIN, POUT; if (fork) { close POUT; open STDIN, "<&PIN"; close PIN; $_ = ; exec "less"; } else { close PIN; open STDOUT, ">&POUT"; open STDERR, ">&POUT"; close POUT; $| = 1; print STDOUT "Sync\n"; exec "cvs status"; }' -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************