help-bash
[Top][All Lists]
Advanced

[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: Mon, 06 Apr 2015 09:40:27 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 4/4/15 7:24 PM, Peng Yu wrote:
> Hi,
> 
> The following code shows that BASH_SUBSHELL behaves differently in ()
> and <(). But my understanding is that, in both case, the echo commands
> are run in a subshell. Is it so? If so, 1 instead of 0 should be
> printed in the last command?

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.

(I am back from my vacation and will be answering bug reports as I am able.)

Chet

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



reply via email to

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