mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
lit: Use close_fds=True on UNIX, to avoid file descriptor pollution of
subprocesses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160556 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
dd2fb6c10b
commit
b1a4642796
@ -24,11 +24,15 @@ kUseCloseFDs = not kIsWindows
|
||||
kAvoidDevNull = kIsWindows
|
||||
|
||||
def executeCommand(command, cwd=None, env=None):
|
||||
# Close extra file handles on UNIX (on Windows this cannot be done while
|
||||
# also redirecting input).
|
||||
close_fds = not kIsWindows
|
||||
|
||||
p = subprocess.Popen(command, cwd=cwd,
|
||||
stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
env=env)
|
||||
env=env, close_fds=close_fds)
|
||||
out,err = p.communicate()
|
||||
exitCode = p.wait()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user