Skip to content

gh-72353: WindowsConsoleIO misbehavior when Ctrl+C is ignored#17976

Open
ZackerySpytz wants to merge 2 commits into
python:mainfrom
ZackerySpytz:bpo-28166-WindowsConsoleIO-Ctrl-C
Open

gh-72353: WindowsConsoleIO misbehavior when Ctrl+C is ignored#17976
ZackerySpytz wants to merge 2 commits into
python:mainfrom
ZackerySpytz:bpo-28166-WindowsConsoleIO-Ctrl-C

Conversation

@ZackerySpytz

@ZackerySpytz ZackerySpytz commented Jan 13, 2020

Copy link
Copy Markdown
Contributor

Continue to read if SIGINT is ignored or the handler doesn't raise
an exception.

Co-Authored-By: Valeriya Sinevich valeriya.sinevich@phystech.edu

https://bugs.python.org/issue28166

Continue to read if SIGINT is ignored or the handler doesn't raise
an exception.

Co-Authored-By: Valeriya Sinevich <valeriya.sinevich@phystech.edu>
@erlend-aasland erlend-aasland changed the title bpo-28166: WindowsConsoleIO misbehavior when Ctrl+C is ignored gh-72353: WindowsConsoleIO misbehavior when Ctrl+C is ignored Jan 5, 2024
@erlend-aasland erlend-aasland requested a review from eryksun January 5, 2024 15:02
if (WaitForSingleObjectEx(hInterruptEvent, 100, FALSE)
== WAIT_OBJECT_0) {
DWORD state = WaitForSingleObjectEx(hInterruptEvent, 100, FALSE);
if (state == WAIT_OBJECT_0 || state == WAIT_TIMEOUT) {

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.

Considering every other possible result is a hard error (which we're currently ignoring... whoops), I don't think this is the right condition.

Probably in the WAIT_TIMEOUT case we want to just continue and not call PyErr_CheckSignals? We certainly shouldn't reset the event, because we haven't been given it

@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes and removed needs backport to 3.11 only security fixes labels May 9, 2024
@hugovk hugovk removed the needs backport to 3.12 only security fixes label Apr 10, 2025
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.14 bugs and security fixes label May 8, 2025
@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 7, 2026
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label May 30, 2026
@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes OS-windows topic-IO

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants