]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
expose EPOLLRDHUP (closes #27567)
authorBenjamin Peterson <benjamin@python.org>
Tue, 19 Jul 2016 04:47:39 +0000 (21:47 -0700)
committerBenjamin Peterson <benjamin@python.org>
Tue, 19 Jul 2016 04:47:39 +0000 (21:47 -0700)
Doc/library/select.rst
Misc/NEWS
Modules/selectmodule.c

index 6cec9f764bf647c0408b608000e161e78ed646bf..93f01a3c118fb445b8b4a873e0616a87a3535459 100644 (file)
@@ -285,6 +285,9 @@ Edge and Level Trigger Polling (epoll) Objects
    | :const:`EPOLLONESHOT` | Set one-shot behavior. After one event is     |
    |                       | pulled out, the fd is internally disabled     |
    +-----------------------+-----------------------------------------------+
+   | :const:`EPOLLRDHUP`   | Stream socket peer closed connection or shut  |
+   |                       | down writing half of connection.              |
+   +-----------------------+-----------------------------------------------+
    | :const:`EPOLLRDNORM`  | Equivalent to :const:`EPOLLIN`                |
    +-----------------------+-----------------------------------------------+
    | :const:`EPOLLRDBAND`  | Priority data band can be read.               |
index 911a29ead2095cdfc02994db683f42942c63d52e..55b6800928ea87475b52d60aa673b6762a018911 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -26,6 +26,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #27567: Expose the EPOLLRDHUP constant in the select module.
+
 - Issue #1621: Avoid signed int negation overflow in the "audioop" module.
 
 - Issue #27533: Release GIL in nt._isdir
index a6b63d22e5a32c5641ab547f7274fd53618ec649..fa71d6e7f491e6d12fc908f5f9cac4eeeb678204 100644 (file)
@@ -2473,12 +2473,12 @@ PyInit_select(void)
     PyModule_AddIntMacro(m, EPOLLPRI);
     PyModule_AddIntMacro(m, EPOLLERR);
     PyModule_AddIntMacro(m, EPOLLHUP);
+    PyModule_AddIntMacro(m, EPOLLRDHUP);
     PyModule_AddIntMacro(m, EPOLLET);
 #ifdef EPOLLONESHOT
     /* Kernel 2.6.2+ */
     PyModule_AddIntMacro(m, EPOLLONESHOT);
 #endif
-    /* PyModule_AddIntConstant(m, "EPOLL_RDHUP", EPOLLRDHUP); */
 
 #ifdef EPOLLRDNORM
     PyModule_AddIntMacro(m, EPOLLRDNORM);