Skip to content

Commit 15a6127

Browse files
authored
[2.7] Mention how to disable signal fd wakeup (GH-2140) (#2151)
(cherry picked from commit d79c1d4)
1 parent bbb3358 commit 15a6127

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Doc/library/signal.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,10 @@ The :mod:`signal` module defines the following functions:
197197
written to the fd. This can be used by a library to wakeup a poll or select
198198
call, allowing the signal to be fully processed.
199199

200-
The old wakeup fd is returned. *fd* must be non-blocking. It is up to the
201-
library to remove any bytes before calling poll or select again.
200+
The old wakeup fd is returned (or -1 if file descriptor wakeup was not
201+
enabled). If *fd* is -1, file descriptor wakeup is disabled.
202+
If not -1, *fd* must be non-blocking. It is up to the library to remove
203+
any bytes from *fd* before calling poll or select again.
202204

203205
When threads are enabled, this function can only be called from the main thread;
204206
attempting to call it from other threads will cause a :exc:`ValueError`

0 commit comments

Comments
 (0)