[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Chet Ramey
Subject: Re: [PATCH] Fix process substitution with named pipes.
Date: Thu, 31 Oct 2013 23:45:18 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.0.1

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 > >(
>     cnt=0; while read line; do let cnt=cnt+1; done; echo $cnt
>   )

Thanks for the report and fix.  This is a long-standing problem, since the
code has been like this for at least three years (as far back as I looked).

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

reply via email to

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