Use the parent os.environ value as default in pre-forked processes #1791

This commit is contained in:
Thomas Nagy 2016-07-31 15:55:47 +02:00
parent 8be4adcc64
commit 3e08a19a56
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA
1 changed files with 2 additions and 0 deletions

View File

@ -821,6 +821,8 @@ def run_prefork_process(cmd, kwargs, cargs):
"""
Delegates process execution to a pre-forked process instance.
"""
if not 'env' in kwargs:
kwargs['env'] = os.environ
try:
obj = base64.b64encode(cPickle.dumps([cmd, kwargs, cargs]))
except TypeError: