This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: child thread termination causes main thread error termination
- From: "Dave Korn" <dk at artimi dot com>
- To: <cygwin at cygwin dot com>
- Date: Mon, 11 Oct 2004 14:51:08 +0100
- Subject: RE: child thread termination causes main thread error termination
> -----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.
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
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/