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


Groups > gnu.bash.bug > #16365

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

From Greg Wooledge <wooledg@eeg.ccf.org>
Newsgroups gnu.bash.bug
Subject Re: bash errexit shell option does not work in some cases.
Date 2020-06-08 07:24 -0400
Message-ID <mailman.1422.1591615505.2541.bug-bash@gnu.org> (permalink)
References <5a7df0ba-3ad1-1f35-1107-09fdd5950359@archlinux.org> <3f403934d6b5d23ca58afc5146416c7@cweb006.nm.nfra.io> <1704.1591007300@jinx.noi.kre.to> <20200608112433.GW4133@eeg.ccf.org>

Show all headers | View raw


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.

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: bash errexit shell option does not work in some cases. Greg Wooledge <wooledg@eeg.ccf.org> - 2020-06-08 07:24 -0400

csiph-web