Petr Viktorin <encu...@gmail.com> added the comment:

I'm a bit out of my depth here. Victor, could you chime in?

The problem with Harris' patch is that, once fork() is protected by the thread 
lock, acquiring that lock (by e.g. calling `PyGILState_GetThisThreadState`) 
from an `atfork` handler hangs deadlocks.

I thought that can be solved by doing the locking in an atfork handler, but 
that's not working out -- CPython's pthread_atfork (which would lock 
_PyThread_AcquireKeyLock for the duration of the fork) would need to be called 
*after* an extension's pthread_atfork (which needs the thread lock temporarily).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://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