summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2011-01-10 14:05:23 +0000
committerroot <root>2011-01-10 14:05:23 +0000
commitd792665ddfc14bef596bb3832648570eed11b4df (patch)
treea8641af4245dd8e00d75a3da29c70a1533e2b9cd
parentecf0bc4b02928296e0a843a7734e30e76209f030 (diff)
*** empty log message ***
-rw-r--r--ev_epoll.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ev_epoll.c b/ev_epoll.c
index eb22ad8..d0caa93 100644
--- a/ev_epoll.c
+++ b/ev_epoll.c
@@ -143,11 +143,12 @@ epoll_poll (EV_P_ ev_tstamp timeout)
{
int i;
int eventcnt;
-
+
/* epoll wait times cannot be larger than (LONG_MAX - 999UL) / HZ msecs, which is below */
/* the default libev max wait time, however. */
EV_RELEASE_CB;
- eventcnt = epoll_wait (backend_fd, epoll_events, epoll_eventmax, (int)ceil (timeout * 1000.));
+ eventcnt = epoll_wait (backend_fd, epoll_events, epoll_eventmax,
+ epoll_epermcnt ? 0 : (int)ceil (timeout * 1000.));
EV_ACQUIRE_CB;
if (expect_false (eventcnt < 0))