[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Why BASH_SUBSHELL behaves differently in () and <()?
From: |
Chet Ramey |
Subject: |
Re: [Help-bash] Why BASH_SUBSHELL behaves differently in () and <()? |
Date: |
Fri, 18 Sep 2015 09:32:15 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
On 9/17/15 5:20 AM, ziyunfei wrote:
> Chet Ramey <address@hidden> writes:
>
>> Yes, it's an oversight in the process substitution code. BASH_SUBSHELL
>> should be handled the same way it is by asynchronous commands, explicit
>> subshells, and command substitution. I have made the simple change and
>> it will be fixed in the next release of bash.
>
>
> Chet, `echo $BASH_SUBSHELL &' and `: | echo $BASH_SUBSHELL' still print 0
> in bash-4.4 alpha, is this a problem?
I'll look at the first and make sure it's handled consistently. The
pipeline, even though it's run in a subshell environment, has never
modified the value of BASH_SUBSHELL in a visible way. Maybe it should.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU address@hidden http://cnswww.cns.cwru.edu/~chet/