From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26255 invoked from network); 25 Sep 1998 16:49:29 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 25 Sep 1998 16:49:29 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id MAA18826; Fri, 25 Sep 1998 12:40:51 -0400 (EDT) Resent-Date: Fri, 25 Sep 1998 12:40:51 -0400 (EDT) From: "Bart Schaefer" Message-Id: <980925094357.ZM17613@candle.brasslantern.com> Date: Fri, 25 Sep 1998 09:43:57 -0700 In-Reply-To: <9809251501.AA18139@ibmth.df.unipi.it> Comments: In reply to Peter Stephenson "PATCH: 3.1.4: Insidious exit status bug" (Sep 25, 5:01pm) References: <9809251501.AA18139@ibmth.df.unipi.it> X-Mailer: Z-Mail (4.0b.820 20aug96) To: zsh-workers@math.gatech.edu Subject: Re: PATCH: 3.1.4: Insidious exit status bug MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"dDzfL3.0.2c4.JUy2s"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4398 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Sep 25, 5:01pm, Peter Stephenson wrote: } Subject: PATCH: 3.1.4: Insidious exit status bug } } Bart wrote: } > zagzig% echo yyy | fgrep -q `echo xxx` && echo ok } > ok } } 2) The shell handled the arguments for fgrep, called the `echo xxx', } and waited for it. As `echo yyy' was already finished, it was } harvested, too. As it was (at that point) the last job in the } pipeline, the job had the STAT_DONE flag set. I'll bet this is exactly the same bug I described back in April: http://www.zsh.org/mla/workers-1998/msg00178.html http://www.zsh.org/mla/workers-1998/msg00180.html The context (a builtin piped to an external with a $(...) argument) is certainly exactly the same. And indeed, with your patch applied to 3.0.5 (it applies fine with fuzz) I'm unable to repeat the bug describe in msg00178.html. In a version of 3.0.5 that does NOT have your patch, I can repeat the bug within five or six tries. Thanks for the patch! -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com