##// END OF EJS Templates
use new _winapi instead of removed _subprocess...
MinRK -
Show More
@@ -189,8 +189,12 b' def base_launch_kernel(code, fname, stdin=None, stdout=None, stderr=None,'
189 creationflags=512, # CREATE_NEW_PROCESS_GROUP
189 creationflags=512, # CREATE_NEW_PROCESS_GROUP
190 stdin=_stdin, stdout=_stdout, stderr=_stderr)
190 stdin=_stdin, stdout=_stdout, stderr=_stderr)
191 else:
191 else:
192 from _subprocess import DuplicateHandle, GetCurrentProcess, \
192 try:
193 DUPLICATE_SAME_ACCESS
193 from _winapi import DuplicateHandle, GetCurrentProcess, \
194 DUPLICATE_SAME_ACCESS
195 except:
196 from _subprocess import DuplicateHandle, GetCurrentProcess, \
197 DUPLICATE_SAME_ACCESS
194 pid = GetCurrentProcess()
198 pid = GetCurrentProcess()
195 handle = DuplicateHandle(pid, pid, pid, 0,
199 handle = DuplicateHandle(pid, pid, pid, 0,
196 True, # Inheritable by new processes.
200 True, # Inheritable by new processes.
@@ -100,7 +100,10 b' class ParentPollerWindows(Thread):'
100 def run(self):
100 def run(self):
101 """ Run the poll loop. This method never returns.
101 """ Run the poll loop. This method never returns.
102 """
102 """
103 from _subprocess import WAIT_OBJECT_0, INFINITE
103 try:
104 from _winapi import WAIT_OBJECT_0, INFINITE
105 except ImportError:
106 from _subprocess import WAIT_OBJECT_0, INFINITE
104
107
105 # Build the list of handle to listen on.
108 # Build the list of handle to listen on.
106 handles = []
109 handles = []
General Comments 0
You need to be logged in to leave comments. Login now