[pypy-svn] r77788 - pypy/branch/fast-forward/lib_pypy

afa at codespeak.net afa at codespeak.net
Mon Oct 11 15:07:20 CEST 2010


Author: afa
Date: Mon Oct 11 15:07:17 2010
New Revision: 77788

Modified:
   pypy/branch/fast-forward/lib_pypy/_subprocess.py
Log:
the multiprocessing module calls CreateProcess with startup_info=None.


Modified: pypy/branch/fast-forward/lib_pypy/_subprocess.py
==============================================================================
--- pypy/branch/fast-forward/lib_pypy/_subprocess.py	(original)
+++ pypy/branch/fast-forward/lib_pypy/_subprocess.py	Mon Oct 11 15:07:17 2010
@@ -133,14 +133,15 @@
 def CreateProcess(name, command_line, process_attr, thread_attr,
                   inherit, flags, env, start_dir, startup_info):
     si = _STARTUPINFO()
-    si.dwFlags = startup_info.dwFlags
-    si.wShowWindow = getattr(startup_info, 'wShowWindow', 0)
-    if startup_info.hStdInput:
-        si.hStdInput = startup_info.hStdInput.handle
-    if startup_info.hStdOutput:
-        si.hStdOutput = startup_info.hStdOutput.handle
-    if startup_info.hStdError:
-        si.hStdError = startup_info.hStdError.handle
+    if startup_info is not None:
+        si.dwFlags = startup_info.dwFlags
+        si.wShowWindow = startup_info.wShowWindow
+        if startup_info.hStdInput:
+            si.hStdInput = startup_info.hStdInput.handle
+        if startup_info.hStdOutput:
+            si.hStdOutput = startup_info.hStdOutput.handle
+        if startup_info.hStdError:
+            si.hStdError = startup_info.hStdError.handle
 
     pi = _PROCESS_INFORMATION()
 



More information about the Pypy-commit mailing list