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


Groups > gnu.bash.bug > #16337

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

Path csiph.com!tncsrv06.tnetconsulting.net!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Eli Schwartz <eschwartz@archlinux.org>
Newsgroups gnu.bash.bug
Subject Re: bash errexit shell option does not work in some cases.
Date Mon, 1 Jun 2020 09:16:17 -0400
Lines 92
Approved bug-bash@gnu.org
Message-ID <mailman.897.1591017393.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> <031b5b39-826a-6523-b03b-b839efe9eb63@archlinux.org>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="g0zXCpzSYli9HjFv6gDlhUL2yFu9qGtx7"
X-Trace usenet.stanford.edu 1591017394 13972 209.51.188.17 (1 Jun 2020 13:16:34 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash@gnu.org
To Robert Elz <kre@munnari.OZ.AU>
Envelope-to bug-bash@gnu.org
X-Spam-BL-Results
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=orion; t=1591017383; bh=c0l4tnBxCzVUrSt5UMc00uvELPAR3V4mfUZeMPXg5FI=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=NE2ooYcnDBDzIeKYCrAf9WYQofLnrtfGPJp2nDyj1RapR2XlqvbMLJ0Tt6QOHQ9wM 2C2CmnFrCRtoeYucHCu4ok1a5pnHFJViKXJAV9OQ2sARWEScZ82i9L7Mu3BIyN2j8Z u5v1geEY5XGwgp0FAuRB34lDbtjLV2y9sO6i9Uo5gOQEG6cueL3LSwZCZZGeVTHLX4 kHutcntE0Znh6bcluQzlFNMjhS4Yb9GQuSUpO+UlOdsCIn6N3ltn+1u+76U19sGmZI 3auN1p3ybhJZOrmoXa5HWe1BGOGaW+NaCKbarsSeLnKTCqviFJWYnc56jygY84vybc JLuIshHlDZt6aUB23MenIf2BK+GTjz+x3VxG9ahzYswvCAtzraJMCLT/dxVtlxKOQj FkoRE1boBSiM2e2Jrbzb6Xwgv015aK/I2Drjk+ZMRUGymelKC+XzAXkoCwFFSx6PTY lATO2w3ECXxReIY+T/onZ7E9u1M2PfCOE0AhVj/l/Ub60kUFXdczZtFxwkJeY/hHBs uThwBJk/BHtL43eo1XGCfTtfQLQ+mb91VZ5UqPskXjfO1vzddGl2HCnTFE/Dw4Imp0 TgMoPKLlf82p21q4Rb7wMV+gFiwVq4uIU8pSPGfczlmq1IsFgOF/xKufU7VURUswyW h8IS3c9sYQZ1oQrHWXqxbQ6c=
X-Clacks-Overhead GNU Terry Pratchett
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0
In-Reply-To <1704.1591007300@jinx.noi.kre.to>
Received-SPF pass client-ip=2a01:4f8:160:6087::1; envelope-from=eschwartz@archlinux.org; helo=orion.archlinux.org
X-detected-operating-system by eggs.gnu.org: No matching host in p0f cache. That's all we know.
X-Spam_score_int -43
X-Spam_score -4.4
X-Spam_bar ----
X-Spam_report (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, 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 <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <031b5b39-826a-6523-b03b-b839efe9eb63@archlinux.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:16337

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On 6/1/20 6:28 AM, Robert Elz wrote:
>     Date:        Sun, 31 May 2020 22:46:48 -0400
>     From:        Eli Schwartz <eschwartz@archlinux.org>
>     Message-ID:  <5a7df0ba-3ad1-1f35-1107-09fdd5950359@archlinux.org>
> 
> While I generally agree with ...
> 
>   | Don't use errexit
> 
> but not really with:
> 
>   | it does not mean what you think it does.
> 
> (it does mean what I think it means ...)

(I think shell developers are exempt from this generalization. :p)

> 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.
> 
> This all results from earlier posix specs where -e and simple commands
> were linked - the wording has been improved (still short of perfect)
> and simple commands are no longer relevant (other than that exit status
> generally originates with the result from a simple command).

As I am a poor user, I could not figure out whether the grammar allowed
or forbade this this result.

So this is actually that unbelievable of unbelievables, a script which
is broken because of set -e and it's actually because set -e has a bug?

Thanks for clarifying.

-- 
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User

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


Thread

Re: bash errexit shell option does not work in some cases. Eli Schwartz <eschwartz@archlinux.org> - 2020-06-01 09:16 -0400

csiph-web