Skip to content

Commit bdff88b

Browse files
miss-islingtonjfly
andauthored
[3.13] gh-131803: Clarify that you must register signal handlers for set_wakeup_fd (GH-131859) (#132522)
gh-131803: Clarify that you must register signal handlers for set_wakeup_fd (GH-131859) (cherry picked from commit 939476b) Co-authored-by: Jeremy Fleischman <[email protected]>
1 parent 866b635 commit bdff88b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: Doc/library/signal.rst

+6-4
Original file line numberDiff line numberDiff line change
@@ -510,10 +510,12 @@ The :mod:`signal` module defines the following functions:
510510

511511
.. function:: set_wakeup_fd(fd, *, warn_on_full_buffer=True)
512512

513-
Set the wakeup file descriptor to *fd*. When a signal is received, the
514-
signal number is written as a single byte into the fd. This can be used by
515-
a library to wakeup a poll or select call, allowing the signal to be fully
516-
processed.
513+
Set the wakeup file descriptor to *fd*. When a signal your program has
514+
registered a signal handler for is received, the signal number is written as
515+
a single byte into the fd. If you haven't registered a signal handler for
516+
the signals you care about, then nothing will be written to the wakeup fd.
517+
This can be used by a library to wakeup a poll or select call, allowing the
518+
signal to be fully processed.
517519

518520
The old wakeup fd is returned (or -1 if file descriptor wakeup was not
519521
enabled). If *fd* is -1, file descriptor wakeup is disabled.

0 commit comments

Comments
 (0)