Skip to content

Commit d79c1d4

Browse files
authored
Mention how to disable signal fd wakeup (#2140)
1 parent 2b5cc5e commit d79c1d4

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
@@ -306,8 +306,10 @@ The :mod:`signal` module defines the following functions:
306306
a library to wakeup a poll or select call, allowing the signal to be fully
307307
processed.
308308

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

312314
Use for example ``struct.unpack('%uB' % len(data), data)`` to decode the
313315
signal numbers list.

0 commit comments

Comments
 (0)