This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Problem with pthead.h - child's thread ending, causes main program to exit
On Wed, 27 Oct 2004, jdeifik wrote:
> I have a somewhat complex program that I rewrote to use pthreads.
> It uses threads in a very simple fashion.
>
> Though I don't have much experience with pthreads, the program works fine
> using mandrake 10.0 linux.
>
> Using cygwin and windows xp sp2, when one thread reaches the end
> of execution, the entire program exits.
And you know this is really what happens because...?
Or, is it this bug?
http://cygwin.com/ml/cygwin/2004-09/msg00257.html
Doesn't seem likely, as I never call pthread_join.
Perhaps it is called implicitly as a thread exits though.
If so, then please try a snapshot:
http://cygwin.com/snapshots/
The new cygwin1.dll fixed my problem.
Everything seems fine now.
> When I run the program with gdb, I get really weird segmentation faults,
> for example:
http://www.cygwin.com/ml/cygwin/2004-10/msg01033.html
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to thread 3280.0xcdc]
> 0x610b479d in random () from /usr/bin/cygwin1.dll
[snip]
> The details of the backtrace vary a bit, but always start off in random in
> cygwin1.dll
You can not trust the back trace from a stripped cygwin1.dll. You must
compile your own with debugging symbols if you want to see a valid trace
into it. (Hint: random is NOT where your problem is)
Ok, then perhaps a non-stripped cygwin1.dll should be supplied by default
so gdb can see what is happening.
> I know others have problems with pthreads locking up main, but this seems
> different to me.
You should quote a reference here as I am not aware of any such issue.
there was a thread this week,
From: Ben Lavender <blavender at gmail dot com>
To: cygwin at cygwin dot com
Date: Thu, 21 Oct 2004 15:43:49 +0200
Subject: RE: problem with pthread.h - child thread's ending locks up main
thread
Since this was from oct 21, and my email was from oct 27, and I quoted
the subject, I didn't think I needed more context.
Thanks,
Jeff Deifik
--
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/