summaryrefslogtreecommitdiffstats
path: root/llvm/utils/lit
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2015-08-25 16:07:06 +0000
committerReid Kleckner <rnk@google.com>2015-08-25 16:07:06 +0000
commit5bf2d613c91500dc5311d49d6faa54e6859efc74 (patch)
tree9e7cbb0876bc923e35154ad1b4efa5a462c5664a /llvm/utils/lit
parent38b8938f40d2068e85cfbb08395622cfa1b0db01 (diff)
downloadbcm5719-llvm-5bf2d613c91500dc5311d49d6faa54e6859efc74.tar.gz
bcm5719-llvm-5bf2d613c91500dc5311d49d6faa54e6859efc74.zip
[lit] Speculatively fix PR24554 by manually closing the process handle
My theory is that somehow Python's refcounting and GC strategy isn't closing the subprocess handle in a timely fashion. This accesses the private '_handle' field of the Popen object, but I see no other way to do this. If this doesn't address the problem on the sanitizer-windows buildbot, we can revert this change. If it does, then let's keep the hack. llvm-svn: 245946
Diffstat (limited to 'llvm/utils/lit')
-rw-r--r--llvm/utils/lit/lit/TestRunner.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/utils/lit/lit/TestRunner.py b/llvm/utils/lit/lit/TestRunner.py
index a4902874325..610d442e756 100644
--- a/llvm/utils/lit/lit/TestRunner.py
+++ b/llvm/utils/lit/lit/TestRunner.py
@@ -257,6 +257,9 @@ def executeShCmd(cmd, shenv, results):
exitCode = None
for i,(out,err) in enumerate(procData):
res = procs[i].wait()
+ # On Windows, manually close the process handles.
+ if kIsWindows:
+ procs[i]._handle.Close()
# Detect Ctrl-C in subprocess.
if res == -signal.SIGINT:
raise KeyboardInterrupt
OpenPOWER on IntegriCloud