On 9/25/26 6:08 AM, Robert Elz wrote:
Date: Fri, 25 Sep 2026 15:10:30 +1200 From: Martin D Kealey <[email protected]> Message-ID: <can_u6mxvxrkhqjn7hzdrntc4v6t4cm65mczxdqcevtazhv2...@mail.gmail.com>| The significant change isn't any combination of «set -e», «set -o errexit» | and/or «shopt -s execfail», but rather the insertion of «exec». You really should start paying a little more attention. You completely ignored the shopt -s execfail, which has the purpose of causing the exit on failure of exec to not happen in interacive shells.
Not quite. It suppresses the immediate exit in a non-interactive shell. Interactive shells -- in the absence of other options, like `errexit' -- don't exit if `exec' fails.
There clearly is an issue here - my guess is that the execfail shopt is implemented by running the exec in a subshell (though how that would work when the exec works I have no idea) - or some similar internal mechanism,
Some other internal mechanism, yes.
As a bug worth fixing, I'd put this one way down the list, it is easy to avoid - just don't use -e. Ever.
It's actually an easy change.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature
