diff options
author | Victor Stinner <vstinner@python.org> | 2020-01-15 17:38:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-15 17:38:55 +0100 |
commit | e85a305503bf83c5a8ffb3a988dfe7b67461cbee (patch) | |
tree | 6bf49817955b9bba97c35a65bcaaa8c0e05ddb96 /Doc/library | |
parent | ed154c387efc5f978ec97900ec9e0ec6631d5498 (diff) | |
download | cpython-git-e85a305503bf83c5a8ffb3a988dfe7b67461cbee.tar.gz |
bpo-38630: Fix subprocess.Popen.send_signal() race condition (GH-16984)
On Unix, subprocess.Popen.send_signal() now polls the process status.
Polling reduces the risk of sending a signal to the wrong process if
the process completed, the Popen.returncode attribute is still None,
and the pid has been reassigned (recycled) to a new different
process.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/subprocess.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index f2e5463d75..7485748036 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -774,6 +774,8 @@ Instances of the :class:`Popen` class have the following methods: Sends the signal *signal* to the child. + Do nothing if the process completed. + .. note:: On Windows, SIGTERM is an alias for :meth:`terminate`. CTRL_C_EVENT and |