help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Option execfail does not work in subshells


From: R. Diez
Subject: Re: [Help-bash] Option execfail does not work in subshells
Date: Tue, 8 Aug 2017 17:04:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1


`execfail' only works when the shell is interactive.  Subshells are
not considered interactive shells.

But that is not what the documentation says:

-----8<-----8<-----8<-----
execfail

If this is set, a non-interactive shell will not exit if it cannot execute the file specified as an argument to the exec builtin command. An interactive shell does not exit if exec fails.
-----8<-----8<-----8<-----

Therefore, a non-interactive shell, such as a subshell, should not exit when the execfail option is set, right? So the 3 ways that my script runs exec should all output the same text.

Regards,
  rdiez



reply via email to

[Prev in Thread] Current Thread [Next in Thread]