Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Mime-Version: 1.0 (Apple Message framework v622)
In-Reply-To: <429CA3E8.7070909@acm.org>
References: <44f83c19cc33e4382680fe3758164ccf@rehley.net>  <20050527202823.GB4939@trixie.casa.cgf.cx>  <0833be552ca5aa00a72ecef822250580@rehley.net>  <20050528161515.GA1323@trixie.casa.cgf.cx>  <1064750c32ec165a486fe7dba0f8b302@rehley.net> <429CA3E8.7070909@acm.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Message-Id: <f04e96900f5730fd25a8baa1c70c8425@rehley.net>
From: Peter Rehley <peter@rehley.net>
Subject: Re: pthreads, cygwin and pthread_mutex_lock not blocking
Date: Wed, 1 Jun 2005 17:22:59 -0700
To: cygwin@cygwin.com
X-IsSubscribed: yes
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id j520NLiH007966



On May 31, 2005, at 10:50 AM, David Rothenberger wrote:

> On 5/31/2005 10:15 AM, Peter Rehley wrote:
>> Well, here is a simple test case, but turns out I wasn't using the 
>> latest version.  I was having the problem on 1.5.12,  I haven't been 
>> able to get a good build with cygwin 1.5.17-1.  It builds and I can 
>> run the install script, but when I put the dll in place I see the 
>> message "cygheap magic number mismatch detected", and gcc doesn't 
>> want to work.
>
> I had a similar problem (see 
> <http://cygwin.com/ml/cygwin/2005-05/msg01251.html>). It turned out it 
> was because I was using the latest release of binutils. Try rolling 
> back to the previous release.
>
Ok, I rolled binutils to 20041229, rebuilt and copied the new dll.  
It's having the same issue that I see in 1.5.12.  When I debug the 
program, I see that the signal is being sent, but it doesn't get 
executed.

I've looked at the cygwin code, and I have noticed that the sleep 
(nanosleep) is calling pthread::cancelable_wait, and that will call 
WaitForMultipleObjects.  However, in pthread_mutex::_lock, it's only 
using WaitForSingleObject.  I'm wondering if something like 
WaitForMultipleObjects should be added to the lock function so that 
signals (SIGCHLD, in my case) can be handled.

It's just a guess since I'm not an expert with this code.

Enjoy,
Peter
-------------------------------
A Møøse once bit my sister


--
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/


