[issue20601] tracing and tests that raise an exception in a SIGALRM handler

Xavier de Gaye report at bugs.python.org
Thu Feb 13 16:28:18 CET 2014


Xavier de Gaye added the comment:

> A signal should not remove the trace function.

And a signal should be traced.
The attached patch postpones all signals except SIGINT while the trace function is being invoked, and thus the signal is traced after returning from this function.
My previous test with a little improvement has been attached too and outputs now, with this patch:

tracing foo
tracing handler
Got ZeroDivisionError.
trace function: <function trace at 0x7fada2776c90>

I did not test the patch against WITH_THREAD not being defined.

----------
Added file: http://bugs.python.org/file34069/tracing_signals.patch

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


More information about the Python-bugs-list mailing list