bug-bash
[Top][All Lists]
Advanced

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

Re: coproc FDs (file descriptors) available to subshells


From: Chet Ramey
Subject: Re: coproc FDs (file descriptors) available to subshells
Date: Wed, 24 Jan 2018 09:53:54 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 1/24/18 9:50 AM, Tadeus Prastowo wrote:
> On Wed, Jan 24, 2018 at 3:16 PM, Chet Ramey <chet.ramey@case.edu> wrote:
>> On 1/24/18 3:38 AM, Tadeus Prastowo wrote:
>>> Hi!
>>>
>>> To quote 
>>> https://www.gnu.org/software/bash/manual/html_node/Coprocesses.html#Coprocesses
>>>
>>> "The file descriptors are not available in subshells."
>>
>> The file descriptors are set to close-on-exec, so they're not available
>> to new processes, and closed explicitly when executing subshell commands
>> such as ( ... ) and asynchronous commands run with `&'.  Command and
>> process substitutions are created as exact copies of their parent, and
>> inherit the file descriptors.
> 
> So, the documentation should be fixed, no?

Sure, it can be clarified.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

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