Zombie Threads (?)
holger krekel
pyth at devel.trillke.net
Fri May 3 12:42:31 EDT 2002
James J. Besemer wrote:
> I'm using threads in Python on Linux. It's a dynamic application so
> threads are freely created and eventually terminate.
>
> When I run PS I notice that there are a number of threads with a Zombie
> status.
>
> I know that with forked sub processes, the OS keeps the children around
> until the parent waits. For Apps that use forking -- there's a hack
> where you insert an additional level of forking, so that the spawned
> children have no direct parent and are cleaned up automatically by the
> OS.
>
> Is there an analogous trick with Python threading on Linux? Or does
> Python do something to minimize the number of zombie threads.
you might be interested that the double-fork thing can be done
in python (on unix only i think):
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66012
regards,
holger
More information about the Python-list
mailing list