From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ross Johnson To: Tristan Savatier Cc: pthreads-win32@sourceware.cygnus.com Subject: Re: pthread_exit bug ? Date: Thu, 02 Sep 1999 03:22:00 -0000 Message-id: References: <37CE487D.FD66CE11@mpegtv.com> X-SW-Source: 1999/msg00072.html Tristan, Please try pthreads-win32-snap-1999-08-12 with your code. It fixes a bug in pthread_exit. ftp://sourceware.cygnus.com/pub/pthreads-win32/dll-latest I'm about to create a new snapshot so keep a lookout for that one also. Cheers. Ross On Thu, 2 Sep 1999, Tristan Savatier wrote: > I am currently using pthreads-win32-snap-1999-05-30, > using VC++ 6.0 under Win98. > > My program creates several threads. At termination, > each thread (except the main thread) terminates by calling > pthread_exit, then the main thread terminates by > calling pthread_exit (at this point, all my threads > are terminated, therefore the process should disapear). > > This works fine with native pthread libraries on > Linux and other Posix systems. > > But I noticed that with pthreads-win32, calling pthread_exit > to terminate my main thread does not work well: the process survives > with two dangling threads (both threads are some type > of internal kernel threads, not running any of my code). > > If I call exit(0) [instead of pthread_exit] to terminate > my main thread, the process terminates properly (i.e. > this is a workaround). > > This looks like a bug: the pthread standard says, > in the pthread_exit specification: > < will be called.>> > > Is that a known bug ? > > -t > +----------------------+---+ | Ross Johnson | | E-Mail: rpj@ise.canberra.edu.au | Info Sciences and Eng|___| | University of Canberra | FAX: +61 6 2015227 | PO Box 1 | | Belconnen ACT 2616 | WWW: http://willow.canberra.edu.au/~rpj/ | AUSTRALIA | +--------------------------+