]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-129204: Add _PYTHON_SUBPROCESS_USE_POSIX_SPAWN environment knob (GH-132184)
authorVincent Fazio <vfazio@gmail.com>
Mon, 7 Apr 2025 03:53:02 +0000 (22:53 -0500)
committerGitHub <noreply@github.com>
Mon, 7 Apr 2025 03:53:02 +0000 (20:53 -0700)
commit4c5dcc6d8292d5142aff8401cb9b9d18b49c6c89
treec9932a809aed897875efcc646b1451b3c2af4cd4
parent6eaa4aeef25f77a31768d8ba5a03f614766aba95
gh-129204: Add _PYTHON_SUBPROCESS_USE_POSIX_SPAWN environment knob (GH-132184)

* Add _PYTHON_SUBPROCESS_USE_POSIX_SPAWN environment knob

Add support for disabling the use of `posix_spawn` via a variable in
the process environment.

While it was previously possible to toggle this by modifying the value
of `subprocess._USE_POSIX_SPAWN`, this required either patching CPython
or modifying it within the interpreter instance which is not always
possible, such as when running applications or scripts not under a
user's control.

Signed-off-by: Vincent Fazio <vfazio@gmail.com>
* fixup NEWS entry

---------

Signed-off-by: Vincent Fazio <vfazio@gmail.com>
Lib/subprocess.py
Misc/NEWS.d/next/Library/2025-04-06-19-25-12.gh-issue-129204.sAVFO6.rst [new file with mode: 0644]