lit: Don't use close_fds=True on Windows.

llvm-svn: 82521
This commit is contained in:
Daniel Dunbar 2009-09-22 04:44:37 +00:00
parent 753f8be411
commit 24a0813fc4
1 changed files with 5 additions and 1 deletions

View File

@ -5,11 +5,15 @@ import ShUtil
import Test
import Util
import platform
class InternalShellError(Exception):
def __init__(self, command, message):
self.command = command
self.message = message
# Don't use close_fds on Windows.
kUseCloseFDs = platform.system() != 'Windows'
def executeCommand(command, cwd=None, env=None):
p = subprocess.Popen(command, cwd=cwd,
stdin=subprocess.PIPE,
@ -111,7 +115,7 @@ def executeShCmd(cmd, cfg, cwd, results):
stdout = stdout,
stderr = stderr,
env = cfg.environment,
close_fds = True))
close_fds = kUseCloseFDs))
# Immediately close stdin for any process taking stdin from us.
if stdin == subprocess.PIPE: