[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fd redirection behaves strangely on OSX
From: |
Chet Ramey |
Subject: |
Re: fd redirection behaves strangely on OSX |
Date: |
Wed, 28 Mar 2007 21:48:41 -0400 |
User-agent: |
Thunderbird 1.5.0.10 (Macintosh/20070221) |
George Huo wrote:
> - A description of the bug behaviour.
> While trying to use fd redirection, I seem to run into lingering bad fds that
> I
> need to exhaust with subsequent commands. See example below. I can't reproduce
> the behaviour on a Linux machine running the same version of bash.
When something like this happens, it's almost always due to a race
condition. In this case, it's probably that the read end of the pipe
has been closed or does not exist when cat tries to fstat it. I've
spent quite a while looking for the race condition, but haven't found
it yet.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Live Strong. No day but today.
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/