Re: [PATCH] Fix process substitution with named pipes.

2013-10-31 Thread Chet Ramey
On 10/31/13, 11:46 AM, Michael Haubenwallner wrote: > When /dev/fd is missing, and named pipes are used instead (like on AIX), > this snippet sometimes does work right, wrong, or hang - depending on > the operating system's process scheduler timing: > > for x in {0..9}; do echo $x; done > >( >

[PATCH] Fix process substitution with named pipes.

2013-10-31 Thread Michael Haubenwallner
When /dev/fd is missing, and named pipes are used instead (like on AIX), this snippet sometimes does work right, wrong, or hang - depending on the operating system's process scheduler timing: for x in {0..9}; do echo $x; done > >( cnt=0; while read line; do let cnt=cnt+1; done; echo $cnt )