diff options
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/os.rst | 9 | ||||
-rw-r--r-- | Doc/library/signal.rst | 14 | ||||
-rw-r--r-- | Doc/library/subprocess.rst | 5 |
3 files changed, 25 insertions, 3 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst index dacf87a..e328399 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -1491,7 +1491,14 @@ written in Python, such as a mail server's external command delivery program. Send signal *sig* to the process *pid*. Constants for the specific signals available on the host platform are defined in the :mod:`signal` module. - Availability: Unix. + + Windows: The :data:`signal.CTRL_C_EVENT` and + :data:`signal.CTRL_BREAK_EVENT` signals are special signals which can + only be sent to console processes which share a common console window, + e.g., some subprocesses. Any other value for *sig* will cause the process + to be unconditionally killed by the TerminateProcess API, and the exit code + will be set to *sig*. The Windows version of :func:`kill` additionally takes + process handles to be killed. .. function:: killpg(pgid, sig) diff --git a/Doc/library/signal.rst b/Doc/library/signal.rst index c6a3fe4..45b78a2 100644 --- a/Doc/library/signal.rst +++ b/Doc/library/signal.rst @@ -74,6 +74,20 @@ The variables defined in the :mod:`signal` module are: 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. diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 13698e7..4b19761 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -373,8 +373,9 @@ Instances of the :class:`Popen` class have the following methods: .. note:: - On Windows only SIGTERM is supported so far. It's an alias for - :meth:`terminate`. + On Windows, SIGTERM is an alias for :meth:`terminate`. CTRL_C_EVENT and + CTRL_BREAK_EVENT can be sent to processes started with a `creationflags` + parameter which includes `CREATE_NEW_PROCESS_GROUP`. .. method:: Popen.terminate() |