Path: csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Greg Wooledge Newsgroups: gnu.bash.bug Subject: Re: bash errexit shell option does not work in some cases. Date: Mon, 8 Jun 2020 07:24:33 -0400 Lines: 26 Approved: bug-bash@gnu.org Message-ID: References: <5a7df0ba-3ad1-1f35-1107-09fdd5950359@archlinux.org> <3f403934d6b5d23ca58afc5146416c7@cweb006.nm.nfra.io> <1704.1591007300@jinx.noi.kre.to> <20200608112433.GW4133@eeg.ccf.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: usenet.stanford.edu 1591615506 23203 209.51.188.17 (8 Jun 2020 11:25:06 GMT) X-Complaints-To: action@cs.stanford.edu To: bug-bash@gnu.org Envelope-to: bug-bash@gnu.org Mail-Followup-To: bug-bash@gnu.org Content-Disposition: inline In-Reply-To: <1704.1591007300@jinx.noi.kre.to> User-Agent: Mutt/1.10.1 (2018-07-13) Received-SPF: none client-ip=139.137.100.1; envelope-from=wooledg@eeg.ccf.org; helo=mail.eeg.ccf.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/08 07:24:34 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <20200608112433.GW4133@eeg.ccf.org> X-Mailman-Original-References: <5a7df0ba-3ad1-1f35-1107-09fdd5950359@archlinux.org> <3f403934d6b5d23ca58afc5146416c7@cweb006.nm.nfra.io> <1704.1591007300@jinx.noi.kre.to> Xref: csiph.com gnu.bash.bug:16365 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.