[issue6721] Locks in python standard library should be sanitized on fork

Gregory P. Smith report at bugs.python.org
Fri Oct 16 12:28:43 CEST 2009


Gregory P. Smith <greg at krypto.org> added the comment:

no need for that.  the problem is that they're held by a thread that
does not exist in the newly forked child process so they will never be
released in the new process.

example: if you fork while another thread is in the middle of logging
something and then try to log something yourself in the child, your
child process will deadlock on the logging module's lock.

locks are not shared between processes so reinitializing them with a new
object wouldn't do anything.

----------

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


More information about the Python-bugs-list mailing list