]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-129204: Add _PYTHON_SUBPROCESS_USE_POSIX_SPAWN environment knob (GH-132184...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 7 Apr 2025 06:24:24 +0000 (08:24 +0200)
committerGitHub <noreply@github.com>
Mon, 7 Apr 2025 06:24:24 +0000 (23:24 -0700)
commit68bbdd902630a5f96ab598a8d6ecacee3c2d5d2e
treed10c99f73a0dc7facecd0b30ece485af06f7320b
parent2452e0aefd8c76265f780307e94574758c2e925f
[3.13] gh-129204: Add _PYTHON_SUBPROCESS_USE_POSIX_SPAWN environment knob (GH-132184) (#132191)

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.

* fixup NEWS entry

---------
(cherry picked from commit 4c5dcc6d8292d5142aff8401cb9b9d18b49c6c89)

Signed-off-by: Vincent Fazio <vfazio@gmail.com>
Co-authored-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]