Commit 1a57ab6f authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

Environment variables for the child process will be a copy of those

of the boss process with any additional specific variables given
on construction (self.env) of ProcessInfo.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1689 e5f2f494-b856-4b98-b285-d166d9295462
parent 4e6bb55c
......@@ -108,16 +108,13 @@ class ProcessInfo:
spawn_stdout = self.dev_null
else:
spawn_stdout = None
spawn_env = self.env
spawn_env['PATH'] = os.environ['PATH']
if 'B10_FROM_SOURCE' in os.environ:
spawn_env['B10_FROM_SOURCE'] = os.environ['B10_FROM_SOURCE']
else:
# Environment variables for the child process will be a copy of those
# of the boss process with any additional specific variables given
# on construction (self.env).
spawn_env = os.environ
spawn_env.update(self.env)
if not 'B10_FROM_SOURCE' in os.environ:
spawn_env['PATH'] = "@@LIBEXECDIR@@:" + spawn_env['PATH']
if 'PYTHON_EXEC' in os.environ:
spawn_env['PYTHON_EXEC'] = os.environ['PYTHON_EXEC']
if 'PYTHONPATH' in os.environ:
spawn_env['PYTHONPATH'] = os.environ['PYTHONPATH']
self.process = subprocess.Popen(self.args,
stdin=subprocess.PIPE,
stdout=spawn_stdout,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment