diff options
author | Benjamin Peterson <benjamin@python.org> | 2019-11-20 04:39:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-20 04:39:14 (GMT) |
commit | 7483451577916e693af6d20cf520b2cc7e2174d2 (patch) | |
tree | 54fdd671a4513a4cf938f1438ce53823909b02db /Doc/library/signal.rst | |
parent | be143ec99674ba38c5811f34cdb85ef39c2dc8f8 (diff) | |
download | cpython-7483451577916e693af6d20cf520b2cc7e2174d2.zip cpython-7483451577916e693af6d20cf520b2cc7e2174d2.tar.gz cpython-7483451577916e693af6d20cf520b2cc7e2174d2.tar.bz2 |
closes bpo-38712: Add signal.pidfd_send_signal. (GH-17070)
This exposes a Linux-specific syscall for sending a signal to a process
identified by a file descriptor rather than a pid.
For simplicity, we don't support the siginfo_t parameter to the syscall. This
parameter allows implementing a pidfd version of rt_sigqueueinfo(2), which
Python also doesn't support.
Diffstat (limited to 'Doc/library/signal.rst')
-rw-r--r-- | Doc/library/signal.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Doc/library/signal.rst b/Doc/library/signal.rst index 8fecc2b..a79fc50 100644 --- a/Doc/library/signal.rst +++ b/Doc/library/signal.rst @@ -247,6 +247,19 @@ The :mod:`signal` module defines the following functions: .. versionadded:: 3.8 +.. function:: pidfd_send_signal(pidfd, sig, siginfo=None, flags=0) + + Send signal *sig* to the process referred to by file descriptor *pidfd*. + Python does not currently support the *siginfo* parameter; it must be + ``None``. The *flags* argument is provided for future extensions; no flag + values are currently defined. + + See the :manpage:`pidfd_send_signal(2)` man page for more information. + + .. availability:: Linux 5.1+ + .. versionadded:: 3.9 + + .. function:: pthread_kill(thread_id, signalnum) Send the signal *signalnum* to the thread *thread_id*, another thread in the |