This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Mark.Shannon
Recipients Mark.Shannon, corona10, eric.snow, gvanrossum, kj, vstinner
Date 2022-01-23.13:33:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642944838.8.0.0736768195134.issue46465@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2022-01-23 13:33:58Mark.Shannonsetrecipients: + Mark.Shannon, gvanrossum, vstinner, eric.snow, corona10, kj
2022-01-23 13:33:58Mark.Shannonsetmessageid: <1642944838.8.0.0736768195134.issue46465@roundup.psfhosted.org>
2022-01-23 13:33:58Mark.Shannonlinkissue46465 messages
2022-01-23 13:33:58Mark.Shannoncreate