]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.10] gh-91401: Conservative backport of `subprocess._USE_VFORK` (#91932)
authorGregory P. Smith <greg@krypto.org>
Sun, 1 May 2022 23:09:50 +0000 (16:09 -0700)
committerGitHub <noreply@github.com>
Sun, 1 May 2022 23:09:50 +0000 (16:09 -0700)
commitea1eba03e7e8401d5acf8b30b56b41faa209e8c6
tree21d81eb6e2a87a1853e2fea2cd5d295574a2ec7e
parente7de54321952ebb58cc414f2160c9ad4f6510af2
[3.10] gh-91401: Conservative backport of `subprocess._USE_VFORK` (#91932)

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 cd5726fe674eaff442510eeb6c75628858be9e9f.

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.
Lib/subprocess.py
Lib/test/test_subprocess.py
Misc/NEWS.d/next/Library/2022-04-26-00-10-06.gh-issue-91401.mddRC8.rst [new file with mode: 0644]
Modules/_posixsubprocess.c