-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…H-113128) (#113178) gh-113009: Fix multiprocessing Process.terminate() on Windows (GH-113128) On Windows, Process.terminate() no longer sets the returncode attribute to always call WaitForSingleObject() in Process.wait(). Previously, sometimes the process was still running after TerminateProcess() even if GetExitCodeProcess() is not STILL_ACTIVE. (cherry picked from commit 4026ad5) Co-authored-by: Victor Stinner <vstinner@python.org>
- Loading branch information
1 parent
6ff7c13
commit 220fae7
Showing
2 changed files
with
35 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
5 changes: 5 additions & 0 deletions
5
Misc/NEWS.d/next/Windows/2023-12-14-19-00-29.gh-issue-113009.6LNdjz.rst
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
:mod:`multiprocessing`: On Windows, fix a race condition in | ||
``Process.terminate()``: no longer set the ``returncode`` attribute to | ||
always call ``WaitForSingleObject()`` in ``Process.wait()``. Previously, | ||
sometimes the process was still running after ``TerminateProcess()`` even if | ||
``GetExitCodeProcess()`` is not ``STILL_ACTIVE``. Patch by Victor Stinner. |