From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8089 invoked from network); 15 Jun 2005 09:10:33 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 15 Jun 2005 09:10:33 -0000 Received: (qmail 72691 invoked from network); 15 Jun 2005 09:10:27 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 15 Jun 2005 09:10:27 -0000 Received: (qmail 15988 invoked by alias); 15 Jun 2005 09:10:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21341 Received: (qmail 15977 invoked from network); 15 Jun 2005 09:10:24 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 15 Jun 2005 09:10:24 -0000 Received: (qmail 72375 invoked from network); 15 Jun 2005 09:10:23 -0000 Received: from mailhost1.csr.com (HELO MAILSWEEPER01.csr.com) (81.105.217.43) by a.mx.sunsite.dk with SMTP; 15 Jun 2005 09:10:17 -0000 Received: from exchange03.csr.com (unverified [10.100.137.60]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Wed, 15 Jun 2005 10:08:22 +0100 Received: from news01.csr.com ([10.103.143.38]) by exchange03.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 15 Jun 2005 10:10:48 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.1/8.12.11) with ESMTP id j5F9AEo3009633 for ; Wed, 15 Jun 2005 10:10:14 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.13.1/8.13.1/Submit) with ESMTP id j5F9AEFa009630 for ; Wed, 15 Jun 2005 10:10:14 +0100 Message-Id: <200506150910.j5F9AEFa009630@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk Subject: Re: subtle `echo' bug In-reply-to: <1050615002844.ZM7767@candle.brasslantern.com> References: <20050614172738.GL4685@solemn.turbinal.org> <200506142212.24133.arvidjaar@newmail.ru> <1050615002844.ZM7767@candle.brasslantern.com> Date: Wed, 15 Jun 2005 10:10:13 +0100 From: Peter Stephenson X-OriginalArrivalTime: 15 Jun 2005 09:10:48.0063 (UTC) FILETIME=[1E7978F0:01C5718A] X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 Bart Schaefer wrote: > This affects any builtin that writes to its standard output, so the > problem is almost certainly resulting from a write error on stdout > because the builtin on the rightmost end of the pipeline is never > reading from its stdin. You can show this up with trap '' PIPE which causes zsh to report the error as a side effect (for reasons I haven't investigated: possibly the error message isn't getting time to emerge in the other case, which may be a bug). Alexey's original example now gives variations on: % seq 1 3 | while read n; do { echo | echo } | echo $n ; done 1 echo: write error: broken pipe zsh: write error: broken pipe 2 3 The numbers always come out because the error is trapped, but the messages show where the write failed because of SIGPIPE. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, 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. **********************************************************************