mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Close #12383: Fix subprocess module with env={}: don't copy the environment
variables, start with an empty environment.
This commit is contained in:
parent
b7149cad04
commit
f1512a2967
3 changed files with 20 additions and 8 deletions
|
@ -1169,7 +1169,7 @@ class Popen(object):
|
|||
# potential deadlocks, thus we do all this here.
|
||||
# and pass it to fork_exec()
|
||||
|
||||
if env:
|
||||
if env is not None:
|
||||
env_list = [os.fsencode(k) + b'=' + os.fsencode(v)
|
||||
for k, v in env.items()]
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue