[llvm] r245946 - [lit] Speculatively fix PR24554 by manually closing the process handle
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 09:07:06 PDT 2015
Author: rnk
Date: Tue Aug 25 11:07:06 2015
New Revision: 245946
URL: http://llvm.org/viewvc/llvm-project?rev=245946&view=rev
Log:
[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.
Modified:
llvm/trunk/utils/lit/lit/TestRunner.py
Modified: llvm/trunk/utils/lit/lit/TestRunner.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestRunner.py?rev=245946&r1=245945&r2=245946&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/TestRunner.py (original)
+++ llvm/trunk/utils/lit/lit/TestRunner.py Tue Aug 25 11:07:06 2015
@@ -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
More information about the llvm-commits
mailing list