Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14230 > unrolled thread

Re: Case of set -e not being in effect in a subshell.

Started byChet Ramey <chet.ramey@case.edu>
First post2018-06-11 11:09 -0400
Last post2018-06-11 11:09 -0400
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Case of set -e not being in effect in a subshell. Chet Ramey <chet.ramey@case.edu> - 2018-06-11 11:09 -0400

#14230 — Re: Case of set -e not being in effect in a subshell.

FromChet Ramey <chet.ramey@case.edu>
Date2018-06-11 11:09 -0400
SubjectRe: Case of set -e not being in effect in a subshell.
Message-ID<mailman.1666.1528729766.1292.bug-bash@gnu.org>
On 6/11/18 6:12 AM, Bartłomiej Palmowski wrote:

> 
> The issue is:
> $ cat bad
> (
>     set -e
>     false
>     echo "Shouldn't happen?"
> ) && :
> $ bash ./bad ; echo $?
> Shouldn't happen?
> 0

`set -e' is ignored for any command of an OR list except the last, whether
it is in effect before the command is executed or when enabled by the
command itself.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web