Skip to content
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

[3.12] gh-104372: Drop the GIL around the vfork() call. (GH-104782) #104942

Merged
merged 1 commit into from
May 25, 2023

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 25, 2023

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 GH-104372.
(cherry picked from commit d086792)

Co-authored-by: Gregory P. Smith gps@python.org


📚 Documentation preview 📚: https://cpython-previews--104942.org.readthedocs.build/

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants