mirror of
https://github.com/python/cpython.git
synced 2025-09-30 12:21:51 +00:00
[3.6] Mention how to disable signal fd wakeup (GH-2140) (#2149)
(cherry picked from commit d79c1d4a94
)
This commit is contained in:
parent
81c05ccc10
commit
d0d63dc1e8
1 changed files with 4 additions and 2 deletions
|
@ -306,8 +306,10 @@ The :mod:`signal` module defines the following functions:
|
||||||
a library to wakeup a poll or select call, allowing the signal to be fully
|
a library to wakeup a poll or select call, allowing the signal to be fully
|
||||||
processed.
|
processed.
|
||||||
|
|
||||||
The old wakeup fd is returned. *fd* must be non-blocking. It is up to the
|
The old wakeup fd is returned (or -1 if file descriptor wakeup was not
|
||||||
library to remove any bytes before calling poll or select again.
|
enabled). If *fd* is -1, file descriptor wakeup is disabled.
|
||||||
|
If not -1, *fd* must be non-blocking. It is up to the library to remove
|
||||||
|
any bytes from *fd* before calling poll or select again.
|
||||||
|
|
||||||
Use for example ``struct.unpack('%uB' % len(data), data)`` to decode the
|
Use for example ``struct.unpack('%uB' % len(data), data)`` to decode the
|
||||||
signal numbers list.
|
signal numbers list.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue