]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-104372: Drop the GIL around the vfork() call. (#104782) (#104958)
authorGregory P. Smith <greg@krypto.org>
Fri, 1 Sep 2023 08:53:06 +0000 (01:53 -0700)
committerGitHub <noreply@github.com>
Fri, 1 Sep 2023 08:53:06 +0000 (08:53 +0000)
commit6ba1234c1c643743be15090ecf8da39137c8cbac
tree80eac4b6c8c4f3bba2a0c146322d5c7c3f20d481
parentb4784b0c5f1cab48b45df5481edc203e25688d0c
[3.11] gh-104372: Drop the GIL around the vfork() call. (#104782) (#104958)

gh-104372: Drop the GIL around the vfork() call. (#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 #104372.

(cherry picked from commit d08679212d9af52dd074cd4a6abb440edb944c9c)
Doc/library/subprocess.rst
Misc/NEWS.d/next/Library/2023-05-22-18-39-53.gh-issue-104372.7tDRaK.rst [new file with mode: 0644]
Modules/_posixsubprocess.c