[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".
resolution: -> invalid
status: open -> closed
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list