Skip to content

Conversation

@ZackerySpytz
Copy link
Contributor

@ZackerySpytz ZackerySpytz commented Jan 13, 2020

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

Co-Authored-By: Valeriya Sinevich [email protected]

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 <[email protected]>
@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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants