This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: TSD destructors not being called for initialthread


On Wed, 31 Mar 2004, Boris Kolpackov wrote:

> Date: Wed, 31 Mar 2004 13:40:22 -0600
> From: Boris Kolpackov <boris@kolpackov.net>
> To: Ulrich Drepper <drepper@redhat.com>
> Cc: libc-alpha@sources.redhat.com
> Subject: [libc-alpha] Re: TSD destructors not being called for initial
>     thread
> 
> Hi Ulrich,
> 
> > That's fixed in the CVS version.
> 
> Looking at your fix I still think TSD destructors are not called
> if initial thread returns from main (as opposed to being canceled
> or via pthread_exit ()).

That is a case of process termination.  Process termination blows
away threads. If you have any other threads beside the initial one,
and those threads have associated TSD, they will be stopped dead in
their tracks without any opportunity to execute destructors. So why
should the main thread's destructors be executed?

-- 
Meta-CVS: the working replacement for CVS that has been stable for two
years.  It versions the directory structure, symbolic links and execute
permissions. It figures out renaming on import. Plus it babysits the kids
and does light housekeeping! http://freshmeat.net/projects/mcvs


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]