From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17895 invoked from network); 27 Jun 2005 14:45:00 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 27 Jun 2005 14:45:00 -0000 Received: (qmail 10069 invoked from network); 27 Jun 2005 14:44:54 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 27 Jun 2005 14:44:54 -0000 Received: (qmail 26484 invoked by alias); 27 Jun 2005 14:44:52 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21391 Received: (qmail 26475 invoked from network); 27 Jun 2005 14:44:51 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 27 Jun 2005 14:44:51 -0000 Received: (qmail 9770 invoked from network); 27 Jun 2005 14:44:51 -0000 Received: from mailhost1.csr.com (HELO MAILSWEEPER01.csr.com) (81.105.217.43) by a.mx.sunsite.dk with SMTP; 27 Jun 2005 14:44:46 -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 ; Mon, 27 Jun 2005 15:42:48 +0100 Received: from news01.csr.com ([10.103.143.38]) by exchange03.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 27 Jun 2005 15:45:49 +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 j5REijPp021112 for ; Mon, 27 Jun 2005 15:44:45 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.13.1/8.13.1/Submit) with ESMTP id j5REiije021107 for ; Mon, 27 Jun 2005 15:44:44 +0100 Message-Id: <200506271444.j5REiije021107@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: <1050627143155.ZM32491@candle.brasslantern.com> References: <20050614172738.GL4685@solemn.turbinal.org> <200506142212.24133.arvidjaar@newmail.ru> <1050615002844.ZM7767@candle.brasslantern.com> <200506150910.j5F9AEFa009630@news01.csr.com> <200506151356.j5FDunra015702@news01.csr.com> <1050615153214.ZM10443@candle.brasslantern.com> <200506151549.j5FFn94K018908@news01.csr.com> <1050615163946.ZM10520@candle.brasslantern.com> <200506271003.j5RA31Uw007298@news01.csr.com> <1050627143155.ZM32491@candle.brasslantern.com> Date: Mon, 27 Jun 2005 15:44:44 +0100 From: Peter Stephenson X-OriginalArrivalTime: 27 Jun 2005 14:45:49.0287 (UTC) FILETIME=[E8B1D770:01C57B26] 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=BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 Bart Schaefer wrote: > On Jun 27, 11:03am, Peter Stephenson wrote: > } > } Are we going to do this? > > I don't see any harm in it, but I have one last question ... > > In looking at the code earlier in this function, I find that it's zsh > that does (the equivalent of) val |= 0200 before testing (val & 0200). > This makes me wonder if we should be using (val & ~0200) rather than > WTERMSIG(val) here. What zsh is setting is (removing some tests) val = 0200 | WTERMSIG(p->status) so I suppose you're right. Index: Src/jobs.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/jobs.c,v retrieving revision 1.39 diff -u -r1.39 jobs.c --- Src/jobs.c 1 Jun 2005 10:45:42 -0000 1.39 +++ Src/jobs.c 27 Jun 2005 14:44:05 -0000 @@ -383,7 +383,8 @@ } /* If we have `foo|while true; (( x++ )); done', and hit * ^C, we have to stop the loop, too. */ - if ((val & 0200) && inforeground == 1) { + if ((val & 0200) && inforeground == 1 && + ((val & ~0200) == SIGINT || (val & ~0200) == SIGQUIT)) { if (!errbrk_saved) { errbrk_saved = 1; prev_breaks = breaks; @@ -399,7 +400,8 @@ adjustwinsize(0); } } - } else if (list_pipe && (val & 0200) && inforeground == 1) { + } else if (list_pipe && (val & 0200) && inforeground == 1 && + ((val & ~0200) == SIGINT || (val & ~0200) == SIGQUIT)) { if (!errbrk_saved) { errbrk_saved = 1; prev_breaks = breaks; -- 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. **********************************************************************