mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
Port #1220212 (os.kill for Win32) to py3k.
This commit is contained in:
parent
b2416e54b1
commit
eb24d7498f
10 changed files with 200 additions and 6 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue