if (res < 0)
{
if (errno != EINTR)
- syserr ();
+ syserr ("(libev) kevent");
return;
}
static void
kqueue_fork (EV_P)
{
- kqueue_fd = kqueue ();
+ for (;;)
+ {
+ kqueue_fd = kqueue ();
+
+ if (kqueue_fd >= 0)
+ break;
+
+ syserr ("(libev) kqueue");
+ }
+
fcntl (kqueue_fd, F_SETFD, FD_CLOEXEC);
/* re-register interest in fds */