Re: Can't wait for process substitution redirected for a subshell

2018-04-25 Thread Chet Ramey
On 4/24/18 4:46 PM, Geir Hauge wrote: > Waiting on a process substitution that is used in redirection for a > command grouping works, but not when using a subshell in place of that > command grouping: > > $ TIMEFORMAT=%R > $ time bash -c '{ :; } 2> >(sleep 2); wait "$!"' > 2.013 >

Can't wait for process substitution redirected for a subshell

2018-04-24 Thread Geir Hauge
Waiting on a process substitution that is used in redirection for a command grouping works, but not when using a subshell in place of that command grouping: $ TIMEFORMAT=%R $ time bash -c '{ :; } 2> >(sleep 2); wait "$!"' 2.013 $ time bash -c '(:) 2> >(sleep 2); wait "$!"' bash