[issue11768] test_signals() of test_threadsignals failure on Mac OS X
STINNER Victor
report at bugs.python.org
Mon Apr 18 12:02:12 CEST 2011
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
It looks like pthread_mutex_lock() and pthread_mutex_unlock() are not reentrant on some platforms (in some implementations of the pthread API).
Antoine: if I understand correctly your patch, if we have a pending signal, all next signals will be simply ignored.
I think that this issue is not specific to Mac OS X: signal_handler() can be called twice at the same time in two different threads or in the same thread (reentrant call).
pthread_sigmask() can be used to avoid reentrant call, but it has no effect on the second case: "signal_handler() called twice at the same time in two different threads".
Note: SA_NODEFER flag of sigaction() has no effect on this issue because signal_handler() is called twice to handle two different signals (SIGUSR1 and SIGUSR2).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11768>
_______________________________________
More information about the Python-bugs-list
mailing list