FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.15] gh-74112: Make Ctrl-C in the IDLE Shell interrupt blocking calls (GH-157662) by miss-islington · Pull Request #158917 · python/cpython · GitHub

Repository navigation

[3.15] gh-74112: Make Ctrl-C in the IDLE Shell interrupt blocking calls (GH-157662) - #158917

Open
miss-islington wants to merge 2 commits into
python:3.15from
miss-islington:backport-9232c21-3.15
Open

miss-islington wants to merge 2 commits into
python:3.15from
miss-islington:backport-9232c21-3.15

Conversation

miss-islington commented Oct 6, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

Send a real SIGINT to the main thread of the user process instead of
calling _thread.interrupt_main(), which only sets a flag checked
between bytecodes. The signal is sent while holding a new lock which
protects sending a message, so that the main thread is not interrupted
in the middle of a message. An interrupted wait for a response now
releases its lock, so that the socket thread does not deadlock.
(cherry picked from commit 9232c21)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com

pythonGH-157662)

Send a real SIGINT to the main thread of the user process instead of
calling _thread.interrupt_main(), which only sets a flag checked
between bytecodes.  The signal is sent while holding a new lock which
protects sending a message, so that the main thread is not interrupted
in the middle of a message.  An interrupted wait for a response now
releases its lock, so that the socket thread does not deadlock.
(cherry picked from commit 9232c21)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…8914)

On a loaded machine the KeyboardInterrupt could be raised before the main
thread reached time.sleep(), escape the test and stop the whole regrtest run.

(cherry picked from commit ea0ee92)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL