aboutsummaryrefslogtreecommitdiffstats
path: root/tools/python
diff options
context:
space:
mode:
Diffstat (limited to 'tools/python')
-rw-r--r--tools/python/xen/util/xpopen.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/python/xen/util/xpopen.py b/tools/python/xen/util/xpopen.py
index 66c2d9a5d8..75aa08e678 100644
--- a/tools/python/xen/util/xpopen.py
+++ b/tools/python/xen/util/xpopen.py
@@ -104,7 +104,7 @@ class xPopen3:
os.dup2(c2pwrite, 1)
if capturestderr:
os.dup2(errin, 2)
- self._run_child(cmd)
+ self._run_child(cmd, env)
os.close(p2cread)
self.tochild = os.fdopen(p2cwrite, 'w', bufsize)
os.close(c2pwrite)
@@ -116,7 +116,7 @@ class xPopen3:
self.childerr = None
_active.append(self)
- def _run_child(self, cmd):
+ def _run_child(self, cmd, env):
if isinstance(cmd, basestring):
cmd = ['/bin/sh', '-c', cmd]
for i in range(3, MAXFD):
@@ -127,7 +127,6 @@ class xPopen3:
except OSError:
pass
try:
- os.execvp(cmd[0], cmd)
if env is None:
os.execvp(cmd[0], cmd)
else: