mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Merged revisions 85315 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85315 | hirokazu.yamamoto | 2010-10-08 17:38:15 +0900 | 1 line Issue #9978: Wait until subprocess completes initialization. (Win32KillTests in test_os) ........
This commit is contained in:
parent
354fe7e381
commit
1f504f1d7a
3 changed files with 23 additions and 2 deletions
|
@ -11,6 +11,8 @@ similar example in C.
|
|||
from ctypes import wintypes, WINFUNCTYPE
|
||||
import signal
|
||||
import ctypes
|
||||
import mmap
|
||||
import sys
|
||||
|
||||
# Function prototype for the handler function. Returns BOOL, takes a DWORD.
|
||||
HandlerRoutine = WINFUNCTYPE(wintypes.BOOL, wintypes.DWORD)
|
||||
|
@ -38,6 +40,10 @@ if __name__ == "__main__":
|
|||
print("Unable to add SetConsoleCtrlHandler")
|
||||
exit(-1)
|
||||
|
||||
# Awaken mail process
|
||||
m = mmap.mmap(-1, 1, sys.argv[1])
|
||||
m[0] = '1'
|
||||
|
||||
# Do nothing but wait for the signal
|
||||
while True:
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue