[llvm-commits] [llvm] r82521 - /llvm/trunk/utils/lit/TestRunner.py

Daniel Dunbar daniel at zuster.org
Mon Sep 21 21:44:37 PDT 2009


Author: ddunbar
Date: Mon Sep 21 23:44:37 2009
New Revision: 82521

URL: http://llvm.org/viewvc/llvm-project?rev=82521&view=rev
Log:
lit: Don't use close_fds=True on Windows.

Modified:
    llvm/trunk/utils/lit/TestRunner.py

Modified: llvm/trunk/utils/lit/TestRunner.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/TestRunner.py?rev=82521&r1=82520&r2=82521&view=diff

==============================================================================
--- llvm/trunk/utils/lit/TestRunner.py (original)
+++ llvm/trunk/utils/lit/TestRunner.py Mon Sep 21 23:44:37 2009
@@ -5,11 +5,15 @@
 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 @@
                                       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:





More information about the llvm-commits mailing list