This is the mail archive of the
mailing list for the Cygwin project.
Re: CygPerl hangs opening FIFO after fork (in both parent&child)
- From: Christopher Faylor <cgf-no-personal-reply-please at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 22 Jun 2006 23:05:53 -0400
- Subject: Re: CygPerl hangs opening FIFO after fork (in both parent&child)
- References: <449B08E2.email@example.com> <449B49A2.7E5EB78B@dessent.net>
- Reply-to: cygwin at cygwin dot com
On Thu, Jun 22, 2006 at 06:53:38PM -0700, Brian Dessent wrote:
>Linda Walsh wrote:
>> The attached test case is simple and fairly short. It does not
>> depend on File::BOM (and has none of the code from it).
>> It's only dependency (other than perl) is the POSIX module,
>> where, from, the "fifo" command is taken.
>This appears to be a deadlock in the Cygwin DLL when both the reader and
>writer end of a fifo tries to open the file at the same time (or nearly
>the same time.) They end up signaling each other to ask about the other
>end of the pipe, and hang there. It has nothing to do with perl or
>fork, as far as I can tell -- the attached C testcase will work fine if
>the reader end sleeps briefly to ensure the opening order. It's just a
>classic race condition somewhere.
Yep. It's a deadlock which uncovered a race.
It should be fixed in the next floor wax available at:
And thanks for the test case which illustrated the problem.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html