Skip to content

[3.10] gh-91401: Conservative backport of subprocess._USE_VFORK #91932

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

Merged
merged 8 commits into from
May 1, 2022

Conversation

gpshead
Copy link
Member

@gpshead gpshead commented Apr 26, 2022

This does not alter the _posixsubprocess.fork_exec() private API to
avoid issues for anyone relying on that (bad idea) or for anyone who's
subprocess.py and _posixsubprocess.so upgrades may not become
visible to existing Python 3.10 processes at the same time.

Backports the concept of cd5726f.

Provides a fail-safe way to disable vfork for #91401.

I didn't backport the documentation as I don't actually expect this to be used and versionadded 3.10.5 always looks weird in docs. It's being done more to have a fail-safe in place for people just in case.

This does not alter the `_posixsubprocess.fork_exec()` private API to
avoid issues for anyone relying on that (bad idea) or for anyone who's
`subprocess.py` and `_posixsubprocess.so` upgrades may not become
visible to existing Python 3.10 processes at the same time.

Backports the concept of cd5726f.
@gpshead gpshead added type-bug An unexpected behavior, bug, or error type-feature A feature request or enhancement stdlib Python modules in the Lib dir extension-modules C modules in the Modules dir labels Apr 26, 2022
@gpshead gpshead requested a review from pablogsal April 26, 2022 00:16
gpshead added 5 commits April 26, 2022 00:17
Other tests obviously have this case covered.
Moves the allow_vfork checks into a stanza before the existing setsig stuff.
Avoids reindenting existing code.
@gpshead gpshead merged commit ea1eba0 into python:3.10 May 1, 2022
@gpshead gpshead deleted the vfork-monsters-3.10 branch May 1, 2022 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension-modules C modules in the Modules dir stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants