summaryrefslogtreecommitdiff
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2015-12-13 13:57:50 -0800
committerGregory P. Smith <greg@krypto.org>2015-12-13 13:57:50 -0800
commit64fa45af5a5acadb3f42a1668f99c0c3784eca69 (patch)
treef66d51de86ea854463982f6f36174b0a3be2a8e3 /Lib/subprocess.py
parent04627633edb723efb74154c7ce988c7f93b11769 (diff)
downloadcpython-git-64fa45af5a5acadb3f42a1668f99c0c3784eca69.tar.gz
Fixes issue #20954: _args_from_interpreter_flags used by multiprocessing
and some tests no longer behaves incorrectly in the presence of the PYTHONHASHSEED environment variable.
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r--Lib/subprocess.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index f9e9104d45..4e7b0644a6 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -498,7 +498,6 @@ def _args_from_interpreter_flags():
'ignore_environment': 'E',
'verbose': 'v',
'bytes_warning': 'b',
- 'hash_randomization': 'R',
'py3k_warning': '3',
}
args = []
@@ -506,6 +505,8 @@ def _args_from_interpreter_flags():
v = getattr(sys.flags, flag)
if v > 0:
args.append('-' + opt * v)
+ if getattr(sys.flags, 'hash_randomization') != 0:
+ args.append('-R')
for opt in sys.warnoptions:
args.append('-W' + opt)
return args