(merge 3.2) Close #12383: Fix subprocess module with env={}: don't copy the

environment variables, start with an empty environment.
This commit is contained in:
Victor Stinner 2011-06-21 17:24:21 +02:00
commit 372b838db5
3 changed files with 20 additions and 8 deletions

View file

@ -1250,7 +1250,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: