Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14229 > unrolled thread
| Started by | Clark Wang <dearvoid@gmail.com> |
|---|---|
| First post | 2018-06-11 23:06 +0800 |
| Last post | 2018-06-11 23:06 +0800 |
| 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.
Re: Case of set -e not being in effect in a subshell. Clark Wang <dearvoid@gmail.com> - 2018-06-11 23:06 +0800
| From | Clark Wang <dearvoid@gmail.com> |
|---|---|
| Date | 2018-06-11 23:06 +0800 |
| Subject | Re: Case of set -e not being in effect in a subshell. |
| Message-ID | <mailman.1664.1528729607.1292.bug-bash@gnu.org> |
On Mon, Jun 11, 2018 at 6:12 PM, Bartłomiej Palmowski <rotwang@crux.org.pl> wrote: > > The issue is: > $ cat bad > ( > set -e > false > echo "Shouldn't happen?" > ) && : > $ bash ./bad ; echo $? > Shouldn't happen? > 0 > $ cat good > ( > set -e > false > echo "Shouldn't happen?" > ) > $ bash ./good ; echo $? > 1 > > Probably there is something obvious that I'm missing. > According to bash man page: > The shell does not exit if the command that fails is [...] part of any command executed in a && or || list except the command following the final && or ||, [...] -clark
Back to top | Article view | gnu.bash.bug
csiph-web