diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-11-13 14:11:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-13 14:11:38 (GMT) |
commit | e5729aef6ff67ae7ed05dffc0855477823826191 (patch) | |
tree | c36830a5f9a7d21f240030fa6d482f19e2a99b06 /Misc | |
parent | bc777047833256bc6b10b2c7b46cce9e9e6f956c (diff) | |
download | cpython-e5729aef6ff67ae7ed05dffc0855477823826191.zip cpython-e5729aef6ff67ae7ed05dffc0855477823826191.tar.gz cpython-e5729aef6ff67ae7ed05dffc0855477823826191.tar.bz2 |
bpo-42296: On Windows, fix CTRL+C regression (GH-23257)
On Windows, fix a regression in signal handling which prevented to
interrupt a program using CTRL+C. The signal handler can be run in a
thread different than the Python thread, in which case the test
deciding if the thread can handle signals is wrong.
On Windows, _PyEval_SignalReceived() now always sets eval_breaker to
1 since it cannot test _Py_ThreadCanHandleSignals(), and
eval_frame_handle_pending() always calls
_Py_ThreadCanHandleSignals() to recompute eval_breaker.
(cherry picked from commit d96a7a83133250377219227b5cfab4dbdddc5d3a)
Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2020-11-13-13-53-11.bpo-42296.DuGrLJ.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-13-13-53-11.bpo-42296.DuGrLJ.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-13-13-53-11.bpo-42296.DuGrLJ.rst new file mode 100644 index 0000000..841a26e --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-11-13-13-53-11.bpo-42296.DuGrLJ.rst @@ -0,0 +1,4 @@ +On Windows, fix a regression in signal handling which prevented to interrupt +a program using CTRL+C. The signal handler can be run in a thread different +than the Python thread, in which case the test deciding if the thread can +handle signals is wrong. |