On Tue, Feb 12, 2013 at 11:16:32AM +0100, Willy Tarreau wrote: > Just to confirm it doesn't come from commit 1c07b0755, could you please > try to apply the attached patch which reverts it ?
As usual I forgot to attach the patch. Here it is. Willy
diff --git a/src/ev_epoll.c b/src/ev_epoll.c index 034ec4c..90efaee 100644 --- a/src/ev_epoll.c +++ b/src/ev_epoll.c @@ -40,11 +40,6 @@ static int epoll_fd; */ static struct epoll_event ev; -#ifndef EPOLLRDHUP -/* EPOLLRDHUP was defined late in libc, and it appeared in kernel 2.6.17 */ -#define EPOLLRDHUP 0x2000 -#endif - /* * speculative epoll() poller */ @@ -81,7 +76,7 @@ REGPRM2 static void _do_poll(struct poller *p, int exp) /* construct the epoll events based on new state */ ev.events = 0; if (en & FD_EV_POLLED_R) - ev.events |= EPOLLIN | EPOLLRDHUP; + ev.events |= EPOLLIN; if (en & FD_EV_POLLED_W) ev.events |= EPOLLOUT; @@ -142,8 +137,8 @@ REGPRM2 static void _do_poll(struct poller *p, int exp) /* process polled events */ for (count = 0; count < status; count++) { - unsigned int n; - unsigned int e = epoll_events[count].events; + unsigned char n; + unsigned char e = epoll_events[count].events; fd = epoll_events[count].data.fd; if (!fdtab[fd].owner) @@ -166,10 +161,6 @@ REGPRM2 static void _do_poll(struct poller *p, int exp) ((e & EPOLLHUP) ? FD_POLL_HUP : 0); } - /* always remap RDHUP to HUP as they're used similarly */ - if (e & EPOLLRDHUP) - n |= FD_POLL_HUP; - if (!n) continue;