summaryrefslogtreecommitdiff
path: root/PC
diff options
context:
space:
mode:
authorBrian Curtin <brian.curtin@gmail.com>2010-04-02 23:26:06 +0000
committerBrian Curtin <brian.curtin@gmail.com>2010-04-02 23:26:06 +0000
commiteaa9a2c608e6fb55c794688c77bb84a50532ca5d (patch)
tree1490b20fa02951359b41c34ac19c44e1f75fa2fc /PC
parentd5f044dacba43b540561df0b3e9b2e08647b6b4d (diff)
downloadcpython-eaa9a2c608e6fb55c794688c77bb84a50532ca5d.tar.gz
Implement #1220212. Add os.kill support for Windows.
os.kill takes one of two newly added signals, CTRL_C_EVENT and CTRL_BREAK_EVENT, or any integer value. The events are a special case which work with subprocess console applications which implement a special console control handler. Any other value but those two will cause os.kill to use TerminateProcess, outright killing the process. This change adds win_console_handler.py, which is a script to implement SetConsoleCtrlHandler and applicable handler function, using ctypes. subprocess also gets another attribute which is a necessary flag to creationflags in Popen in order to send the CTRL events.
Diffstat (limited to 'PC')
-rw-r--r--PC/_subprocess.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/PC/_subprocess.c b/PC/_subprocess.c
index bb240e107e..b4680a77d5 100644
--- a/PC/_subprocess.c
+++ b/PC/_subprocess.c
@@ -586,4 +586,5 @@ init_subprocess()
defint(d, "INFINITE", INFINITE);
defint(d, "WAIT_OBJECT_0", WAIT_OBJECT_0);
defint(d, "CREATE_NEW_CONSOLE", CREATE_NEW_CONSOLE);
+ defint(d, "CREATE_NEW_PROCESS_GROUP", CREATE_NEW_PROCESS_GROUP);
}