[issue13697] python RLock implementation unsafe with signals
Antoine Pitrou
report at bugs.python.org
Tue Jan 3 15:40:36 CET 2012
Antoine Pitrou <pitrou at free.fr> added the comment:
Yes, using synchronization primitives or doing I/O in Python signal handlers isn't a good idea. Perhaps the signal docs should be clearer about that.
> Of course, this wasn't ever safe code, and we're changing it (to have the signal handler merely set a integer flag that the logging handler can consult without locking)
Indeed, setting a variable (or using set_wakeup_fd()) is the right approach.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13697>
_______________________________________
More information about the Python-bugs-list
mailing list