Skip to content

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

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:os_kill_err
Jan 17, 2025
Merged

gh-58689: Fix os.kill() error handling on Windows#128932
vstinner merged 1 commit into
python:mainfrom
vstinner:os_kill_err

Conversation

@vstinner

@vstinner vstinner commented Jan 17, 2025

Copy link
Copy Markdown
Member

@vstinner

Copy link
Copy Markdown
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
Copy Markdown
Member Author

cc @rruuaanng

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

Copy link
Copy Markdown

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

@vstinner

Copy link
Copy Markdown
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
)

(cherry picked from commit 939df0f)

Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app

bedevere-app Bot commented Jan 17, 2025

Copy link
Copy Markdown

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
)

(cherry picked from commit 939df0f)

Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app

bedevere-app Bot commented Jan 17, 2025

Copy link
Copy Markdown

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 <vstinner@python.org>
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 <vstinner@python.org>
@rruuaanng

Copy link
Copy Markdown
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