In Unix in general, if you do not care about the return value of the
child thread, you can simply detach() the thread, then the thread will
not stay in a zombie state. When the child calls exit, the thread will
exit completely.

Eric Vigeant

-----Original Message-----
From: Leo Sutic [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 12, 2003 8:42 AM
To: 'Avalon framework users'
Subject: RE: [Event] Zombie threads - HELP - dunno Linux



> From: Berin Loritsch [mailto:[EMAIL PROTECTED] 
>
> So what you are saying is that the threads do not naturally 
> clean themselves up like they do in other operating systems?  
> How about when the parent process is terminated?

The do clean up, but apparently (I checked some stuff) each OS
thread has an *exit value*, that is retrieved via join(). In the
time between thread end and join, the exit value is held in the
zombie thread. Then you join() the thread, and retrieve it
and the thread can die.

(I get some zombie threads in Java as well. They usually die after a few
seconds.)

/LS


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to