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.
diff --git a/Doc/library/signal.rst b/Doc/library/signal.rst
index 84f08b3..300c717 100644
--- a/Doc/library/signal.rst
+++ b/Doc/library/signal.rst
@@ -75,6 +75,20 @@
the system are defined by this module.
+.. data:: CTRL_C_EVENT
+
+ The signal corresponding to the CTRL+C keystroke event.
+
+ Availability: Windows.
+
+
+.. data:: CTRL_BREAK_EVENT
+
+ The signal corresponding to the CTRL+BREAK keystroke event.
+
+ Availability: Windows.
+
+
.. data:: NSIG
One more than the number of the highest signal number.