This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: GCJ built multithreaded program keeps creating zombies
On Wed, Dec 18, 2002 at 04:36:11PM -0700, Tom Tromey wrote:
> Wolfgang> When a process (and thus, here, also a thread) ends, it
> Wolfgang> remains a zombie until its return valued is reaped by a
> Wolfgang> waitpid call, which should also be what pthread_join
> Wolfgang> does. So unless a thread is joined, it will remain a zombie.
>
> Is this one of those places where Linux threads don't follow posix?
>
> We create detached threads. My understanding is that such threads
> *can't* be passed as an argument to pthread_join.
Yes. A soon-forthcoming version of the Linux threads support (NPTL)
won't have this problem; but for now that's how life works. The
manager thread is supposed to take care of preventing the zombie from
hanging around but when RT sigs are messed up this might not happen.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer