Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Doc/library/select.rst
Original file line number Diff line number Diff line change
Expand Up @@ -284,31 +284,31 @@
| Constant | Meaning |
+=========================+===============================================+
| :const:`EPOLLIN` | Available for read |
+-------------------------+-----------------------------------------------+

Check warning on line 287 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: EPOLLIN [ref.const]
| :const:`EPOLLOUT` | Available for write |
+-------------------------+-----------------------------------------------+

Check warning on line 289 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: EPOLLOUT [ref.const]
| :const:`EPOLLPRI` | Urgent data for read |
+-------------------------+-----------------------------------------------+

Check warning on line 291 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: EPOLLPRI [ref.const]
| :const:`EPOLLERR` | Error condition happened on the assoc. fd |
+-------------------------+-----------------------------------------------+

Check warning on line 293 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: EPOLLERR [ref.const]
| :const:`EPOLLHUP` | Hang up happened on the assoc. fd |
+-------------------------+-----------------------------------------------+

Check warning on line 295 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: EPOLLHUP [ref.const]
| :const:`EPOLLET` | Set Edge Trigger behavior, the default is |
| | Level Trigger behavior |

Check warning on line 297 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: EPOLLET [ref.const]
+-------------------------+-----------------------------------------------+
| :const:`EPOLLONESHOT` | Set one-shot behavior. After one event is |
| | pulled out, the fd is internally disabled |

Check warning on line 300 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: EPOLLONESHOT [ref.const]
+-------------------------+-----------------------------------------------+
| :const:`EPOLLEXCLUSIVE` | Wake only one epoll object when the |
| | associated fd has an event. The default (if |

Check warning on line 303 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: EPOLLEXCLUSIVE [ref.const]
| | this flag is not set) is to wake all epoll |
| | objects polling on a fd. |
+-------------------------+-----------------------------------------------+
| :const:`EPOLLRDHUP` | Stream socket peer closed connection or shut |
| | down writing half of connection. |

Check warning on line 308 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: EPOLLRDHUP [ref.const]
+-------------------------+-----------------------------------------------+
| :const:`EPOLLRDNORM` | Equivalent to :const:`EPOLLIN` |
+-------------------------+-----------------------------------------------+

Check warning on line 311 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: EPOLLRDNORM [ref.const]
| :const:`EPOLLRDBAND` | Priority data band can be read. |
+-------------------------+-----------------------------------------------+
| :const:`EPOLLWRNORM` | Equivalent to :const:`EPOLLOUT` |
Expand All @@ -317,11 +317,17 @@
+-------------------------+-----------------------------------------------+
| :const:`EPOLLMSG` | Ignored. |
+-------------------------+-----------------------------------------------+
| :const:`EPOLLWAKEUP` | Prevents sleep during event waiting. |
+-------------------------+-----------------------------------------------+

.. versionadded:: 3.6
:const:`EPOLLEXCLUSIVE` was added. It's only supported by Linux Kernel 4.5
or later.

.. versionadded:: 3.14
:const:`EPOLLWAKEUP` was added. It's only supported by Linux Kernel 3.5
or later.

.. method:: epoll.close()

Close the control file descriptor of the epoll object.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Add the ``EPOLLWAKEUP`` constants to the :mod:`select`
module.
4 changes: 4 additions & 0 deletions Modules/selectmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2715,6 +2715,10 @@ _select_exec(PyObject *m)
#ifdef EPOLLMSG
ADD_INT(EPOLLMSG);
#endif
#ifdef EPOLLWAKEUP
/* Kernel 3.5+ */
ADD_INT(EPOLLWAKEUP);
#endif

#ifdef EPOLL_CLOEXEC
ADD_INT(EPOLL_CLOEXEC);
Expand Down
Loading