Re: some problems with scope of fds in process substitution

2017-12-10 Thread Chet Ramey
On 12/4/17 10:19 AM, Stephane Chazelas wrote: > One major differnce with ksh93 though is that it won't work with > > cmd | tee >(cmd2) > > unless you enable lastpipe. Of course not: that's the whole point of lastpipe, and the major difference there is broader than $! and process substitutions.

Re: some problems with scope of fds in process substitution

2017-12-04 Thread Stephane Chazelas
2017-12-04 08:46:24 -0500, Chet Ramey: [...] > Bash-4.4 allows you to wait for the last process substitution, since the > pid appears in $!, like ksh93. Thanks, I hadn't noticed it had changed in 4.4 One major differnce with ksh93 though is that it won't work with cmd | tee >(cmd2) unless you

Re: some problems with scope of fds in process substitution

2017-12-04 Thread Chet Ramey
On 12/3/17 6:07 PM, Stephane Chazelas wrote: > 2017-12-03 17:31:00 -0500, Chet Ramey: >> On 12/1/17 2:00 PM, Stephane Chazelas wrote: >> >>> Also, there's a lot of problems reported at >>> unix.stackexchange.com at least that are caused by bash not >>> waiting for the processes started by process s

Re: some problems with scope of fds in process substitution

2017-12-03 Thread Stephane Chazelas
2017-12-03 17:31:00 -0500, Chet Ramey: > On 12/1/17 2:00 PM, Stephane Chazelas wrote: > > > Also, there's a lot of problems reported at > > unix.stackexchange.com at least that are caused by bash not > > waiting for the processes started by process substitutions, > > especially the >(...) form. >

Re: some problems with scope of fds in process substitution

2017-12-03 Thread Chet Ramey
On 12/1/17 2:00 PM, Stephane Chazelas wrote: > Also, there's a lot of problems reported at > unix.stackexchange.com at least that are caused by bash not > waiting for the processes started by process substitutions, > especially the >(...) form. Bash always reaps these processes. Do you mean waiti

some problems with scope of fds in process substitution

2017-12-01 Thread Stephane Chazelas
FYI, as seen at https://unix.stackexchange.com/a/408171, there are still a few "problems" with process substitution, where some fds are closed where they probably shouldn't: > Note that even with the latest (4.4.12 as of writing) version, bash still has > a few bugs here like: > > $ bash -c 'ev