Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Insidious exit status bugs
- X-seq: zsh-workers 4396
- From: "Zefram" <zefram@xxxxxxxxx>
- To: pws@xxxxxxxxxxxxxxxxx (Peter Stephenson)
- Subject: Re: Insidious exit status bugs
- Date: Fri, 25 Sep 1998 11:50:57 +0100 (BST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <9809251009.AA12696@xxxxxxxxxxxxxxxxx> from "Peter Stephenson" at Sep 25, 98 12:09:50 pm
Peter Stephenson wrote:
>First: the exit status from the `...` or $(...) is being explicitly
>passed back as lastval, i.e. $?. Why??? There's a variable cmdoutval
>whose only function in life is to remember that status to be assigned
>to lastval, so someone thought it was a good idea.
Assignments such as
foo=$(grep -l foo *)
are supposed to set $? to the exit status of the $() command. POSIX.2
clause 3.9.1 requires this.
-zefram
Messages sorted by:
Reverse Date,
Date,
Thread,
Author