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

Vinay Sajip report at bugs.python.org
Sat Jun 2 16:49:29 CEST 2012


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

>  Use file locks in logging, whenever possible.

Logging doesn't just log to files, and moreover, also has locks to serialise access to internal data structures (nothing to do with files). Hence, using file locks in logging is not going to magically solve problems caused in threading+forking scenarios.

Apart from logging a commonly used part of the stdlib library which uses locks, I don't think this issue is to do with logging, specifically; logging uses locks in an unexceptional, conventional way, much as any other code might. Whatever solution is come up with for this thorny issue, it needs to be generic, in my view; otherwise we might just be papering over the cracks.

----------

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


More information about the Python-bugs-list mailing list