forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[3.12] pythongh-104372: Drop the GIL around the vfork() call. (python…
…GH-104782) (python#104942) pythongh-104372: Drop the GIL around the vfork() call. (pythonGH-104782) On Linux where the `subprocess` module can use the `vfork` syscall for faster spawning, prevent the parent process from blocking other threads by dropping the GIL while it waits for the vfork'ed child process `exec` outcome. This prevents spawning a binary from a slow filesystem from blocking the rest of the application. Fixes pythonGH-104372. (cherry picked from commit d086792) Co-authored-by: Gregory P. Smith <gps@python.org>
- Loading branch information
1 parent
930efde
commit 5c2971b
Showing
3 changed files
with
31 additions
and
6 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/Library/2023-05-22-18-39-53.gh-issue-104372.7tDRaK.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 @@ | ||
On Linux where :mod:`subprocess` can use the ``vfork()`` syscall for faster | ||
spawning, prevent the parent process from blocking other threads by dropping | ||
the GIL while it waits for the vfork'ed child process ``exec()`` outcome. | ||
This prevents spawning a binary from a slow filesystem from blocking the | ||
rest of the application. |
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