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

Comparing libev/ev_kqueue.c (file contents):
Revision 1.9 by root, Tue Nov 6 00:10:04 2007 UTC vs.
Revision 1.11 by root, Tue Nov 6 01:17:16 2007 UTC

85 kqueue_changecnt = 0; 85 kqueue_changecnt = 0;
86 86
87 if (res < 0) 87 if (res < 0)
88 { 88 {
89 if (errno != EINTR) 89 if (errno != EINTR)
90 syserr (); 90 syserr ("(libev) kevent");
91 91
92 return; 92 return;
93 } 93 }
94 94
95 for (i = 0; i < res; ++i) 95 for (i = 0; i < res; ++i)
183} 183}
184 184
185static void 185static void
186kqueue_fork (EV_P) 186kqueue_fork (EV_P)
187{ 187{
188 close (kqueue_fd);
189
188 kqueue_fd = kqueue (); 190 while ((kqueue_fd = kqueue ()) < 0)
191 syserr ("(libev) kqueue");
192
189 fcntl (kqueue_fd, F_SETFD, FD_CLOEXEC); 193 fcntl (kqueue_fd, F_SETFD, FD_CLOEXEC);
190 194
191 /* re-register interest in fds */ 195 /* re-register interest in fds */
192 fd_rearm_all (EV_A); 196 fd_rearm_all (EV_A);
193} 197}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines