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

Gregory P. Smith report at bugs.python.org
Thu Feb 10 17:56:34 CET 2011


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

fwiw http://bugs.python.org/issue6643 recently fixed on issue where a mutex was being closed instead of reinitialized after a fork.  more are likely needed.

Are you suggesting to use pthread_atfork to call pthread_mutex_init on all mutexes created by Python in the child after a fork?  I'll have to ponder that some more.  Given the mutexes are all useless post fork it does not strike me as a bad idea.

----------

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


More information about the Python-bugs-list mailing list