]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-91401: Add a failsafe way to disable vfork. (#91490)
authorGregory P. Smith <greg@krypto.org>
Mon, 25 Apr 2022 23:19:39 +0000 (16:19 -0700)
committerGitHub <noreply@github.com>
Mon, 25 Apr 2022 23:19:39 +0000 (16:19 -0700)
commitcd5726fe674eaff442510eeb6c75628858be9e9f
treed311f0b144298e29596d1fb5dcc4629ec9e8647e
parenteddd07f840c9a4ab0ee05ce56d98caac0f072cef
gh-91401: Add a failsafe way to disable vfork. (#91490)

Just in case there is ever an issue with _posixsubprocess's use of
vfork() due to the complexity of using it properly and potential
directions that Linux platforms where it defaults to on could take, this
adds a failsafe so that users can disable its use entirely by setting
a global flag.

No known reason to disable it exists. But it'd be a shame to encounter
one and not be able to use CPython without patching and rebuilding it.

See the linked issue for some discussion on reasoning.

Also documents the existing way to disable posix_spawn.
Doc/library/subprocess.rst
Lib/multiprocessing/util.py
Lib/subprocess.py
Lib/test/test_capi.py
Lib/test/test_subprocess.py
Misc/NEWS.d/next/Library/2022-04-25-21-33-48.gh-issue-91401._Jo4Bu.rst [new file with mode: 0644]
Modules/_posixsubprocess.c