Skip to content

[3.9] bpo-42296: On Windows, fix CTRL+C regression (GH-23257)#23259

Merged
miss-islington merged 1 commit into
python:3.9from
miss-islington:backport-d96a7a8-3.9
Nov 13, 2020
Merged

[3.9] bpo-42296: On Windows, fix CTRL+C regression (GH-23257)#23259
miss-islington merged 1 commit into
python:3.9from
miss-islington:backport-d96a7a8-3.9

Conversation

@miss-islington

@miss-islington miss-islington commented Nov 13, 2020

Copy link
Copy Markdown
Contributor

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 d96a7a8)

Co-authored-by: Victor Stinner vstinner@python.org

https://bugs.python.org/issue42296

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 d96a7a8)

Co-authored-by: Victor Stinner <vstinner@python.org>
@miss-islington

Copy link
Copy Markdown
Contributor Author

@vstinner: Status check is done, and it's a success ✅ .

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good bot.

@miss-islington

Copy link
Copy Markdown
Contributor Author

@vstinner: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit e5729ae into python:3.9 Nov 13, 2020
@miss-islington miss-islington deleted the backport-d96a7a8-3.9 branch November 13, 2020 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants