Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ERR__EXIT failure (was Re: zsh 5.2-test-1)
On 2016-12-05 11:30:29 +0000, Peter Stephenson wrote:
> And plus also free bonus with same fix on { ... } --- see tests. But it
> occurs to me perhaps it's not that simple...
>
> What about ( ... )? We can't check what's going on inside, so
> presumably exiting on any non-zero status from that must be right?
If you mean:
set -e; ( false && true; ); echo OK
then yes. A good idea is to compare with what the other shells do.
dash, bash, ksh93 and mksh all exit in this case.
> If so, is it really right to suppress exit on the status at the end
> of { ... } or should the two work the same way?
Concerning
set -e; { false && true; }; echo OK
dash, bash, ksh93 and mksh all print OK.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author