mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
[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 cd5726fe67
.
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 commit is contained in:
parent
e7de543219
commit
ea1eba03e7
4 changed files with 55 additions and 2 deletions
|
@ -691,7 +691,10 @@ def _use_posix_spawn():
|
|||
return False
|
||||
|
||||
|
||||
# These are primarily fail-safe knobs for negatives. A True value does not
|
||||
# guarantee the given libc/syscall API will be used.
|
||||
_USE_POSIX_SPAWN = _use_posix_spawn()
|
||||
_USE_VFORK = True
|
||||
|
||||
|
||||
class Popen:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue