##// END OF EJS Templates
tests: teach `killdaemons` on Windows to use an exit code provided by a caller...
Matt Harbison -
r52888:23cc79e0 default
parent child Browse files
Show More
@@ -56,7 +56,12 if os.name == 'nt':
56 if r == WAIT_OBJECT_0:
56 if r == WAIT_OBJECT_0:
57 pass # terminated, but process handle still available
57 pass # terminated, but process handle still available
58 elif r == WAIT_TIMEOUT:
58 elif r == WAIT_TIMEOUT:
59 _check(ctypes.windll.kernel32.TerminateProcess(handle, -1))
59 # Allow the caller to optionally specify the exit code, to
60 # simulate killing with a signal.
61 exit_code = int(os.environ.get("DAEMON_EXITCODE", -1))
62 _check(
63 ctypes.windll.kernel32.TerminateProcess(handle, exit_code)
64 )
60 elif r == WAIT_FAILED:
65 elif r == WAIT_FAILED:
61 _check(0) # err stored in GetLastError()
66 _check(0) # err stored in GetLastError()
62
67
General Comments 0
You need to be logged in to leave comments. Login now