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


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

Re: bash errexit shell option does not work in some cases.

Started byGreg Wooledge <wooledg@eeg.ccf.org>
First post2020-06-08 07:24 -0400
Last post2020-06-08 07:24 -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: bash errexit shell option does not work in some cases. Greg Wooledge <wooledg@eeg.ccf.org> - 2020-06-08 07:24 -0400

#16365 — Re: bash errexit shell option does not work in some cases.

FromGreg Wooledge <wooledg@eeg.ccf.org>
Date2020-06-08 07:24 -0400
SubjectRe: bash errexit shell option does not work in some cases.
Message-ID<mailman.1422.1591615505.2541.bug-bash@gnu.org>
On Mon, Jun 01, 2020 at 05:28:20PM +0700, Robert Elz wrote:
> in this case:
> 
>   | You're merely the latest person to discover that this applies to you:
>   | http://mywiki.wooledge.org/BashFAQ/105
> 
> doesn't really apply - the cases reported are simply bugs in bash,
> a shell implementing -e correctly should exit as it was expected to.

The specification of set -e is not fixed.  It keeps changing.  Bash
implements a version of set -e that was specified at some point in
the past, which included the phrase "simple command".  So, the rules
that apply to compound commands and the rules that apply to simple
commands are not the same.

A more recent POSIX specification has changed the wording, and therefore
bash's implementation is out of date.  A future version of bash will
conform to the new wording, which means it will (once again) break
backward compatibility with older versions of bash (and also with any
other shells that still implement the older specification).

Simply waving this off as a "bug in bash" is quite unfair.

This is part of the set -e nightmare, which is what we keep trying to
get you (and everyone else) to understand.

[toc] | [standalone]


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


csiph-web