[issue7931] Interpreter does not terminate if daemonized while running multithreaded

Amaury Forgeot d'Arc report at bugs.python.org
Tue Feb 16 18:53:35 CET 2010


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

libc.daemon() calls forks(), which duplicates only the main thread.
The other thread does not exists in the forked process, and the interpreter blocks while trying to wait for it...

Please use os.fork() instead, it has code to forget the threads created by the threading module (and clears some other locks as well, preventing deadlocks).
Or google for "daemonize python".

----------
nosy: +amaury.forgeotdarc
resolution:  -> invalid
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7931>
_______________________________________


More information about the Python-bugs-list mailing list