On 5/18/26 5:02 AM, Robert Elz wrote:

   | An interactive shell does not exit, but does not execute the
   | command associated with the expansion and any containing function
   | calls exit with a nonzero status.

That's too specific, the general rule for when a non-interactive shell
would exit because of some condition or other, is that interactive shells
instead abandon all they are doing, whatever it is, and return immediately
to the highest level command prompt (issue PS1 and wait for a new command
with $? set to indicate failure).

I have no reason to believe bash differs from all other shells in this regard,

The behavior is more varied than you think. Bash, yash, and mksh do it one
way, ksh93 and the ash-based shells (dash, netbsd sh, etc.) do it the other.

--
``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/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to