]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-42296: On Windows, fix CTRL+C regression (GH-23257)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 13 Nov 2020 14:11:38 +0000 (06:11 -0800)
committerGitHub <noreply@github.com>
Fri, 13 Nov 2020 14:11:38 +0000 (06:11 -0800)
commite5729aef6ff67ae7ed05dffc0855477823826191
treec36830a5f9a7d21f240030fa6d482f19e2a99b06
parentbc777047833256bc6b10b2c7b46cce9e9e6f956c
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>
Misc/NEWS.d/next/Core and Builtins/2020-11-13-13-53-11.bpo-42296.DuGrLJ.rst [new file with mode: 0644]
Python/ceval.c