[Top][All Lists]

[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:16:29 -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 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.

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

reply via email to

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