X-Git-Url: https://git.llucax.com/software/libev.git/blobdiff_plain/5e20ccfe261679c78f9aa365ac087fb0700e0f2b..c04c7d0577ceddfe470b6fdcaf727ced91a67d1a:/ev_epoll.c?ds=inline diff --git a/ev_epoll.c b/ev_epoll.c index ee7ceea..bdd746b 100644 --- a/ev_epoll.c +++ b/ev_epoll.c @@ -42,7 +42,8 @@ epoll_modify (EV_P_ int fd, int oev, int nev) (nev & EV_READ ? EPOLLIN : 0) | (nev & EV_WRITE ? EPOLLOUT : 0); - epoll_ctl (epoll_fd, mode, fd, &ev); + if (!epoll_ctl (epoll_fd, mode, fd, &ev)) + fd_kill (EV_A_ fd); } static void @@ -102,11 +103,9 @@ epoll_destroy (EV_P) static void epoll_fork (EV_P) { - int fd; - epoll_fd = epoll_create (256); fcntl (epoll_fd, F_SETFD, FD_CLOEXEC); - fd_rearm_all (); + fd_rearm_all (EV_A); }