diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nxt_epoll_engine.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/nxt_epoll_engine.c b/src/nxt_epoll_engine.c index 7e9a0b1c..c3d629a6 100644 --- a/src/nxt_epoll_engine.c +++ b/src/nxt_epoll_engine.c @@ -27,7 +27,7 @@ * eventfd2() Linux 2.6.27, glibc 2.9. * accept4() Linux 2.6.28, glibc 2.10. * eventfd2(EFD_SEMAPHORE) Linux 2.6.30, glibc 2.10. - * EPOLLEXCLUSIVE Linux 4.5. + * EPOLLEXCLUSIVE Linux 4.5, glibc 2.24. */ @@ -570,9 +570,17 @@ nxt_epoll_oneshot_write(nxt_event_engine_t *engine, nxt_fd_event_t *ev) static void nxt_epoll_enable_accept(nxt_event_engine_t *engine, nxt_fd_event_t *ev) { + uint32_t events; + ev->read = NXT_EVENT_ACTIVE; - nxt_epoll_change(engine, ev, EPOLL_CTL_ADD, EPOLLIN); + events = EPOLLIN; + +#ifdef EPOLLEXCLUSIVE + events |= EPOLLEXCLUSIVE; +#endif + + nxt_epoll_change(engine, ev, EPOLL_CTL_ADD, events); } |