diff options
author | root <root> | 2007-10-31 17:55:55 +0000 |
---|---|---|
committer | root <root> | 2007-10-31 17:55:55 +0000 |
commit | f432e03e319f1ece247021aa0810c4af1cb50042 (patch) | |
tree | fac009e395322dd6dd7a30d39043a1d04747eca2 /ev.c | |
parent | caa1fd0cc89d111a00f323bb6eff46f57311aed5 (diff) |
beginners mistake
Diffstat (limited to 'ev.c')
-rw-r--r-- | ev.c | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -41,8 +41,6 @@ #include <sys/time.h> #include <time.h> -#define HAVE_EPOLL 1 - #ifndef HAVE_MONOTONIC # ifdef CLOCK_MONOTONIC # define HAVE_MONOTONIC 1 @@ -190,6 +188,19 @@ queue_events (W *events, int eventcnt, int type) event (events [i], type); } +/* called on EBADF to verify fds */ +static void +fd_recheck () +{ + int fd; + + for (fd = 0; fd < anfdmax; ++fd) + if (anfds [fd].wev) + if (fcntl (fd, F_GETFD) == -1 && errno == EBADF) + while (anfds [fd].head) + evio_stop (anfds [fd].head); +} + /*****************************************************************************/ static struct ev_timer **timers; |