summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Tool/MSCommon/common.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Tool/MSCommon/common.py')
-rw-r--r--src/engine/SCons/Tool/MSCommon/common.py23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/engine/SCons/Tool/MSCommon/common.py b/src/engine/SCons/Tool/MSCommon/common.py
index 2353172..596ea2d 100644
--- a/src/engine/SCons/Tool/MSCommon/common.py
+++ b/src/engine/SCons/Tool/MSCommon/common.py
@@ -120,18 +120,25 @@ def normalize_env(env, keys):
def get_output(vcbat, args = None, env = None):
"""Parse the output of given bat file, with given args."""
+
+ if env is None:
+ # Create a blank environment, for use in launching the tools
+ env= SCons.Environment.Environment(tools=[])
+
if args:
debug("Calling '%s %s'" % (vcbat, args))
- popen = subprocess.Popen('"%s" %s & set' % (vcbat, args),
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- env=env)
+ popen = SCons.Action._subproc(env,
+ '"%s" %s & set' % (vcbat, args),
+ stdin = 'devnull',
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
else:
debug("Calling '%s'" % vcbat)
- popen = subprocess.Popen('"%s" & set' % vcbat,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- env=env)
+ popen = SCons.Action._subproc(env,
+ '"%s" & set' % vcbat,
+ stdin = 'devnull',
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
# Use the .stdout and .stderr attributes directly because the
# .communicate() method uses the threading module on Windows