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
Date: Mon, 11 Oct 2004 10:11:28 -0400
From: Christopher Faylor <cgf-no-personal-reply-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: child thread termination causes main thread error termination
Message-ID: <20041011141128.GB11681@trixie.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <7e48807e0485.7e04857e4880@tampabay.rr.com> <NUTMEGy3JQTQATlpTt20000038c@NUTMEG.CAM.ARTIMI.COM>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <NUTMEGy3JQTQATlpTt20000038c@NUTMEG.CAM.ARTIMI.COM>
User-Agent: Mutt/1.4.1i

On Mon, Oct 11, 2004 at 02:51:08PM +0100, Dave Korn wrote:
>> -----Original Message-----
>> From: cygwin-owner On Behalf Of gmiller
>> Sent: 09 October 2004 19:49
>
>>I have a sample thread application that runs under Ferdora Core 2
>>latest but exits on an error condition under cygwin.  If I add sleeps
>>to the end of the child threads then the program will go to completion.
>>While using "insight" the error can be tracked into the library code.
>>I have attached the source code and output of cygcheck.  Is this a know
>>problem and if so is there any other workaround.
>
>pthread_cond_t start_cv = PTHREAD_COND_INITIALIZER; pthread_mutex_t
>start_mutex = PTHREAD_MUTEX_INITIALIZER;
>
>pthread_cond_t done_cv = PTHREAD_COND_INITIALIZER; pthread_mutex_t
>done_mutex = PTHREAD_MUTEX_INITIALIZER;
>
>pthread_mutex_t print_mutex = PTHREAD_MUTEX_INITIALIZER;
>
>Haven't even tried to run your testcase yet, but I've found static
>initialisation of pthread_ types to be unreliable under cygwin; use the
>pthread_XXX_init functions instead, and see if that helps.

?  I don't see why static initialization shouldn't work.  Do you have
a test case which illustrates the unreliability?

cgf

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

