projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd2fb6c
)
lit: Use close_fds=True on UNIX, to avoid file descriptor pollution of
author
Daniel Dunbar
<daniel@zuster.org>
Fri, 20 Jul 2012 18:29:34 +0000
(18:29 +0000)
committer
Daniel Dunbar
<daniel@zuster.org>
Fri, 20 Jul 2012 18:29:34 +0000
(18:29 +0000)
subprocesses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160556
91177308
-0d34-0410-b5e6-
96231b3b80d8
utils/lit/lit/TestRunner.py
patch
|
blob
|
history
diff --git
a/utils/lit/lit/TestRunner.py
b/utils/lit/lit/TestRunner.py
index 3004d2c713410df8047bf5516f13c25d2dc8493b..71882b76f8b95f819eb794630d8ed9313487b32b 100644
(file)
--- a/
utils/lit/lit/TestRunner.py
+++ b/
utils/lit/lit/TestRunner.py
@@
-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()