summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
authorJakub KulĂ­k <Kulikjak@gmail.com>2023-12-17 05:19:05 (GMT)
committerGitHub <noreply@github.com>2023-12-17 05:19:05 (GMT)
commit48c907a15ceae7202fcfeb435943addff896c42c (patch)
tree3a55910a34781c81cc7f4fe2c754f8c1321ae83e /Lib/subprocess.py
parentcde1335485b7bffb12c378d230ae48ad77d76ab1 (diff)
downloadcpython-48c907a15ceae7202fcfeb435943addff896c42c.zip
cpython-48c907a15ceae7202fcfeb435943addff896c42c.tar.gz
cpython-48c907a15ceae7202fcfeb435943addff896c42c.tar.bz2
gh-113119 fix environment handling in subprocess.Popen when posix_spawn is used (#113120)
* Allow posix_spawn to inherit environment form parent environ variable. With this change, posix_spawn call can behave similarly to execv with regards to environments when used in subprocess functions.
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r--Lib/subprocess.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index d6edd1a..1919ea4 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -1756,9 +1756,6 @@ class Popen:
c2pread, c2pwrite,
errread, errwrite):
"""Execute program using os.posix_spawn()."""
- if env is None:
- env = os.environ
-
kwargs = {}
if restore_signals:
# See _Py_RestoreSignals() in Python/pylifecycle.c