diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2019-05-23 20:30:00 (GMT) |
---|---|---|
committer | Antoine Pitrou <antoine@python.org> | 2019-05-23 20:30:00 (GMT) |
commit | 608876b6b1eb59538e6c29671a733033fb8b5be7 (patch) | |
tree | 4d7501f1f43b222329912a33a60518ada47dbf81 /Doc/c-api | |
parent | b82e17e626f7b1cd98aada0b1ebb65cb9f8fb184 (diff) | |
download | cpython-608876b6b1eb59538e6c29671a733033fb8b5be7.zip cpython-608876b6b1eb59538e6c29671a733033fb8b5be7.tar.gz cpython-608876b6b1eb59538e6c29671a733033fb8b5be7.tar.bz2 |
bpo-23395: Fix PyErr_SetInterrupt if the SIGINT signal is ignored or not handled (GH-7778)
``_thread.interrupt_main()`` now avoids setting the Python error status if the ``SIGINT`` signal is ignored or not handled by Python.
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/exceptions.rst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst index 18ff697..d3f6daa 100644 --- a/Doc/c-api/exceptions.rst +++ b/Doc/c-api/exceptions.rst @@ -519,13 +519,13 @@ Signal Handling single: SIGINT single: KeyboardInterrupt (built-in exception) - This function simulates the effect of a :const:`SIGINT` signal arriving --- the - next time :c:func:`PyErr_CheckSignals` is called, :exc:`KeyboardInterrupt` will - be raised. It may be called without holding the interpreter lock. - - .. % XXX This was described as obsolete, but is used in - .. % _thread.interrupt_main() (used from IDLE), so it's still needed. + Simulate the effect of a :const:`SIGINT` signal arriving. The next time + :c:func:`PyErr_CheckSignals` is called, the Python signal handler for + :const:`SIGINT` will be called. + If :const:`SIGINT` isn't handled by Python (it was set to + :data:`signal.SIG_DFL` or :data:`signal.SIG_IGN`), this function does + nothing. .. c:function:: int PySignal_SetWakeupFd(int fd) |