r5198: don't consider failure to remove an epoll event as enough reason to
authorAndrew Tridgell <tridge@samba.org>
Thu, 3 Feb 2005 12:26:28 +0000 (12:26 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:09:30 +0000 (13:09 -0500)
fallback to select(). This can happen in too many situations.
(This used to be commit 2d7242f2ec945c1e5fbc6f256265471f60ac8cd9)

source4/lib/events/events.c

index a852df68eb468bdee9e14888efeea046499fb9c6..3a15172d95f881f00c8546a4075462a6af3b1450 100644 (file)
@@ -158,7 +158,7 @@ static void calc_maxfd(struct event_context *ev)
 */
 static void epoll_fallback_to_select(struct event_context *ev, const char *reason)
 {
-       DEBUG(0,("%s - using select() - %s\n", reason, strerror(errno)));
+       DEBUG(0,("%s (%s) - falling back to select()\n", reason, strerror(errno)));
        close(ev->epoll_fd);
        ev->epoll_fd = -1;
 }
@@ -197,9 +197,7 @@ static int event_fd_destructor(void *ptr)
                ZERO_STRUCT(event);
                event.events = epoll_map_flags(fde->flags);
                event.data.ptr = fde;
-               if (epoll_ctl(ev->epoll_fd, EPOLL_CTL_DEL, fde->fd, &event) != 0) {
-                       epoll_fallback_to_select(ev, "EPOLL_CTL_DEL failed");
-               }
+               epoll_ctl(ev->epoll_fd, EPOLL_CTL_DEL, fde->fd, &event);
        }
 #endif
        return 0;