[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Option execfail does not work in subshells
From: |
Chet Ramey |
Subject: |
Re: [Help-bash] Option execfail does not work in subshells |
Date: |
Tue, 15 Aug 2017 08:20:13 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 8/9/17 8:43 AM, R. Diez wrote:
> There does not seem to be a valid reason for execfail to not work in a
> subshell. Should I create a bug for this? (I am assuming that there is a
> public bug tracker for Bash).
This has been the case for so long there is probably code that depends on
it. I'm reluctant to change it now in the absence of a compelling reason
to do so.
> There is one other thing that I noticed. When the 'exec' calls redirects
> stdout and stderr, they remain redirected after 'exec' fails. I resorted to
> saving and restoring their file descriptors in this scenario. However, I
> think that this fact should be clearly documented, because, at the moment,
> after reading the docs you tend to believe that such a permanent
> redirection should only be the case if you specify no command to run in the
> 'exec' calls.
I'll take a look.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU address@hidden http://cnswww.cns.cwru.edu/~chet/