mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
gh-131803: Clarify that you must register signal handlers for set_wakeup_fd (#131859)
This commit is contained in:
parent
8768df2fe9
commit
939476bbbb
1 changed files with 6 additions and 4 deletions
|
@ -510,10 +510,12 @@ The :mod:`signal` module defines the following functions:
|
||||||
|
|
||||||
.. function:: set_wakeup_fd(fd, *, warn_on_full_buffer=True)
|
.. function:: set_wakeup_fd(fd, *, warn_on_full_buffer=True)
|
||||||
|
|
||||||
Set the wakeup file descriptor to *fd*. When a signal is received, the
|
Set the wakeup file descriptor to *fd*. When a signal your program has
|
||||||
signal number is written as a single byte into the fd. This can be used by
|
registered a signal handler for is received, the signal number is written as
|
||||||
a library to wakeup a poll or select call, allowing the signal to be fully
|
a single byte into the fd. If you haven't registered a signal handler for
|
||||||
processed.
|
the signals you care about, then nothing will be written to the wakeup fd.
|
||||||
|
This can be used by a library to wakeup a poll or select call, allowing the
|
||||||
|
signal to be fully processed.
|
||||||
|
|
||||||
The old wakeup fd is returned (or -1 if file descriptor wakeup was not
|
The old wakeup fd is returned (or -1 if file descriptor wakeup was not
|
||||||
enabled). If *fd* is -1, file descriptor wakeup is disabled.
|
enabled). If *fd* is -1, file descriptor wakeup is disabled.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue