Ping :) ---------- Forwarded message ---------- From: Tadeus Prastowo <tadeus.prast...@unitn.it> Date: Wed, Jan 24, 2018 at 7:52 PM Subject: Re: coproc FDs (file descriptors) available to subshells To: chet.ra...@case.edu Cc: bug-bash@gnu.org
On Wed, Jan 24, 2018 at 7:32 PM, Tadeus Prastowo <tadeus.prast...@unitn.it> wrote: > On Wed, Jan 24, 2018 at 5:51 PM, Tadeus Prastowo > <tadeus.prast...@unitn.it> wrote: >> On Wed, Jan 24, 2018 at 3:55 PM, Tadeus Prastowo >> <tadeus.prast...@unitn.it> wrote: [...] >>> Okay, I will propose a patch. >> >> diff --git a/doc/bashref.texi b/doc/bashref.texi >> index c0f4a2f..fee8f0e 100644 >> --- a/doc/bashref.texi >> +++ b/doc/bashref.texi >> @@ -1197,7 +1197,10 @@ This pipe is established before any >> redirections specified by the >> command (@pxref{Redirections}). >> The file descriptors can be utilized as arguments to shell commands >> and redirections using standard word expansions. >> -The file descriptors are not available in subshells. >> +The file descriptors are not available in subshells other than those >> +created by command and process substitutions (see the descriptions >> +the substitutions in @ref{Command Substitution} and >> +@ref{Process Substitution}, respectively). >> >> The process ID of the shell spawned to execute the coprocess is >> available as the value of the variable @env{NAME}_PID. >> @@ -3025,6 +3028,12 @@ shell's parent, and traps ignored by the shell >> are ignored >> A command invoked in this separate environment cannot affect the >> shell's execution environment. >> >> +Command substitution and process substitution are invoked in a >> +separate execution environment that starts as an exact duplicate of >> +the execution environment of the shell. As before, any command within >> +the separate execution environment cannot affect the shell's execution >> +environment. >> + >> Command substitution, commands grouped with parentheses, >> and asynchronous commands are invoked in a >> subshell environment that is a duplicate of the shell environment, > > I think the patch misses some information. Please find attached the > new patch that I propose. What do you think? Sorry, the patch still misses some information as per https://lists.gnu.org/archive/html/bug-bash/2011-04/msg00056.html. I attach the updated patch. What do you think? Thank you. -- Best regards, Tadeus
patch
Description: Binary data