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

STINNER Victor report at bugs.python.org
Sat Jul 9 04:02:15 EDT 2016


STINNER Victor added the comment:

I suggest to close the issue as WONT FIX. Python code base is huge and
Python depends on a lot of external code. We cannot warranty anything.

It might be possible to track all kinds of locks with an infinite time. But
I'm not sure that it's worth it.

It is possible to use fork() with threads. The problem is more to execute
non trivial code after the fork. In short, the POSIX advices to only call
exec() syscall after fork and nothing else. The list of functions which are
safe after fork() is very short.

You can still use the multiprocessing module using the fork server for
example.

----------

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


More information about the Python-bugs-list mailing list