delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/06/23/00:54:56

X-Spam-Check-By: sourceware.org
Date: Thu, 22 Jun 2006 19:52:37 -0700
From: Yitzchak Scott-Thoennes <sthoenna AT efn DOT org>
To: cygwin AT cygwin DOT com
Subject: Re: CygPerl hangs opening FIFO after fork (in both parent&child)
Message-ID: <20060623025236.GA2720@efn.org>
References: <449B08E2 DOT 9040302 AT tlinx DOT org> <449B49A2 DOT 7E5EB78B AT dessent DOT net>
Mime-Version: 1.0
In-Reply-To: <449B49A2.7E5EB78B@dessent.net>
User-Agent: Mutt/1.4.2.1i
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list 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.

Good job isolating this problem, Linda and Brian.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019