Mark Shannon <m...@hotpy.org> added the comment:

Is this a bug?

Signal handling in Python is asynchronous. 
https://docs.python.org/3/library/signal.html#execution-of-python-signal-handlers

The example code tests whether the interpreter responds synchronously and 
immediately.

If you add `for _in range(1): pass` or a call to any Python function in between 
the `os.kill(pid, SIGNUM)` and the `if not self.called:` then the test passes.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46465>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to