Skip to content

gh-58689: Fix os.kill() error handling on Windows #128932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jan 17, 2025

@vstinner
Copy link
Member Author

I chose to not add a NEWS entry since it seems like GenerateConsoleCtrlEvent() and TerminateProcess() cannot fail in practice: nobody reported an actual bug. Only @pitrou noticed that the error handling code seems to be broken while reviewing the code.

@vstinner
Copy link
Member Author

cc @rruuaanng

@vstinner vstinner merged commit 939df0f into python:main Jan 17, 2025
51 checks passed
@vstinner vstinner deleted the os_kill_err branch January 17, 2025 12:30
@miss-islington-app
Copy link

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

@vstinner
Copy link
Member Author

Merged, thanks for the review @zooba.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 17, 2025
@bedevere-app
Copy link

bedevere-app bot commented Jan 17, 2025

GH-128937 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jan 17, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 17, 2025
@bedevere-app
Copy link

bedevere-app bot commented Jan 17, 2025

GH-128938 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Jan 17, 2025
vstinner added a commit that referenced this pull request Jan 17, 2025
…128938)

gh-58689: Fix os.kill() error handling on Windows (GH-128932)
(cherry picked from commit 939df0f)

Co-authored-by: Victor Stinner <[email protected]>
vstinner added a commit that referenced this pull request Jan 17, 2025
…128937)

gh-58689: Fix os.kill() error handling on Windows (GH-128932)
(cherry picked from commit 939df0f)

Co-authored-by: Victor Stinner <[email protected]>
@rruuaanng
Copy link
Contributor

Oh, it looks like I'm late. Thank you for handling this @vstinner. The patch looks great—definitely more complete than just fixing the return value :)
These legacy issues have taken a significant amount of time to discuss in the past, yet no effective solutions have been reached. We still need to continue tracking these issues.

srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 21, 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.

3 participants