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

lesha report at bugs.python.org
Sat Jul 9 00:19:06 EDT 2016


lesha added the comment:

On a moment's reflection, a lot of my prior comment is wrong. Sorry about that. 

- glog does not, that I know of, sanitize locks on fork. You just shouldn't log after fork but before exec.

- Using `pthread_atfork` to clean up the `logging` lock might be enough to make it safe from the "just forked" context, but without adding fairly exhaustive tests around this logic, it would be fragile with respect to further improvements to `logging`. So even just making this one library safe is a considerable amount of work.

So I retract most of my previous opinion. Sorry.

----------

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


More information about the Python-bugs-list mailing list