Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: 3.1.4: Insidious exit status bug



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



Messages sorted by: Reverse Date, Date, Thread, Author