Petr Viktorin added the comment:

Here is a proof of concept patch from Jaroslav Škarvada. It fixes the problem 
by holding the mutex used for PyThread_create_key while forking.

To make it more than PoC it needs adding _PyThread_AcquireKeyLock and 
_ReleaseKeyLock (similar to _PyImport_AcquireLock() etc.) and calling those.  
Other than that, does this approach look reasonable?

----------
keywords: +patch
nosy: +encukou
Added file: http://bugs.python.org/file46682/fork_hold_keymutex.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29640>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to