Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 96e9716

Browse files
committed
expose EPOLLRDHUP (closes #27567)
1 parent 6fb9090 commit 96e9716

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

Doc/library/select.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,9 @@ Edge and Level Trigger Polling (epoll) Objects
285285
| :const:`EPOLLONESHOT` | Set one-shot behavior. After one event is |
286286
| | pulled out, the fd is internally disabled |
287287
+-----------------------+-----------------------------------------------+
288+
| :const:`EPOLLRDHUP` | Stream socket peer closed connection or shut |
289+
| | down writing half of connection. |
290+
+-----------------------+-----------------------------------------------+
288291
| :const:`EPOLLRDNORM` | Equivalent to :const:`EPOLLIN` |
289292
+-----------------------+-----------------------------------------------+
290293
| :const:`EPOLLRDBAND` | Priority data band can be read. |

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Core and Builtins
2626
Library
2727
-------
2828

29+
- Issue #27567: Expose the EPOLLRDHUP constant in the select module.
30+
2931
- Issue #1621: Avoid signed int negation overflow in the "audioop" module.
3032

3133
- Issue #27533: Release GIL in nt._isdir

Modules/selectmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2473,12 +2473,12 @@ PyInit_select(void)
24732473
PyModule_AddIntMacro(m, EPOLLPRI);
24742474
PyModule_AddIntMacro(m, EPOLLERR);
24752475
PyModule_AddIntMacro(m, EPOLLHUP);
2476+
PyModule_AddIntMacro(m, EPOLLRDHUP);
24762477
PyModule_AddIntMacro(m, EPOLLET);
24772478
#ifdef EPOLLONESHOT
24782479
/* Kernel 2.6.2+ */
24792480
PyModule_AddIntMacro(m, EPOLLONESHOT);
24802481
#endif
2481-
/* PyModule_AddIntConstant(m, "EPOLL_RDHUP", EPOLLRDHUP); */
24822482

24832483
#ifdef EPOLLRDNORM
24842484
PyModule_AddIntMacro(m, EPOLLRDNORM);

0 commit comments

Comments
 (0)