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

Re: Strange function/pipestatus behavior, maybe a scope bug?



Peter, all,

Thank you for taking the time to provide your research and experience on
this issue.

Absent any further material communication on the subject (more googling has
not yielded anything of substance), I appear to have provided a test case
that exhibits the error behavior 100% of the time.  Based on the referenced
thread and my further search results, this is a material development.

After reading, AFAICT the main hurdle to identification of this bug has
been related to its previously extremely low probability of occurrence in
provided test cases.

I have used my test case to verify 100% occurrence on another, very
different hardware, kernel, and zsh (4.2.1 vs. 5.0.0) version, using
precisely the same test case (different version of awk; forced to provide
'-f -' in awkFunc).

I suggest this to be a significant progression in identification of this
bug, as well as indicating a greatly heightened severity, owing to the 100%
incorrect handling of pipeline exit values in the provided, very simple
test case (again, substantially different than previous reports I've been
able to find).

Sadly, my C fu is not up to par, otherwise I would delve into it myself.
 Please let me know if I can be of any further assistance.

Best,



%Ian


On Wed, Oct 23, 2013 at 1:21 AM, Peter Stephenson
<p.stephenson@xxxxxxxxxxx>wrote:

> On Tue, 22 Oct 2013 11:03:07 -0700
> Ian F <in4mer@xxxxxxxxx> wrote:
> > Potential bug case:
> >
> > awkFunc() { awk; }
> >
> > % false | true | false | true | awkFunc; echo $pipestatus
> > 0
>
> Yes, that's a bug owing to the way the shell executes internal shell
> commands within the right hand side of a pipeline.  There was a thread
> on this starting at zsh-workers/29973:
>
> http://www.zsh.org/mla/workers/2011/msg01394.html
>
> pws
>



-- 
Ian F

Big hitter, the Lama


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