ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev_epoll.c
(Generate patch)

Comparing libev/ev_epoll.c (file contents):
Revision 1.20 by root, Tue Nov 6 00:10:04 2007 UTC vs.
Revision 1.21 by root, Tue Nov 6 00:52:33 2007 UTC

55 int eventcnt = epoll_wait (epoll_fd, epoll_events, epoll_eventmax, ceil (timeout * 1000.)); 55 int eventcnt = epoll_wait (epoll_fd, epoll_events, epoll_eventmax, ceil (timeout * 1000.));
56 56
57 if (eventcnt < 0) 57 if (eventcnt < 0)
58 { 58 {
59 if (errno != EINTR) 59 if (errno != EINTR)
60 syserr (); 60 syserr ("(libev) epoll_wait");
61 61
62 return; 62 return;
63 } 63 }
64 64
65 for (i = 0; i < eventcnt; ++i) 65 for (i = 0; i < eventcnt; ++i)
108} 108}
109 109
110static void 110static void
111epoll_fork (EV_P) 111epoll_fork (EV_P)
112{ 112{
113 for (;;)
114 {
113 epoll_fd = epoll_create (256); 115 epoll_fd = epoll_create (256);
116
117 if (epoll_fd >= 0)
118 break;
119
120 syserr ("(libev) epoll_create");
121 }
122
114 fcntl (epoll_fd, F_SETFD, FD_CLOEXEC); 123 fcntl (epoll_fd, F_SETFD, FD_CLOEXEC);
115 124
116 fd_rearm_all (EV_A); 125 fd_rearm_all (EV_A);
117} 126}
118 127

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines