]> arthur.barton.de Git - ngircd-alex.git/commitdiff
io_close(): explicitly remove fd from epoll set
authorFlorian Westphal <fw@strlen.de>
Sun, 4 Sep 2005 13:38:59 +0000 (13:38 +0000)
committerFlorian Westphal <fw@strlen.de>
Sun, 4 Sep 2005 13:38:59 +0000 (13:38 +0000)
src/ngircd/io.c

index 96672da691a1b858f70eb2723a44898f2991cc44..5c8d8c8fe5e564d9938950782e7d9c80dd3e4298 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: io.c,v 1.10 2005/08/30 13:38:16 fw Exp $";
+static char UNUSED id[] = "$Id: io.c,v 1.11 2005/09/04 13:38:59 fw Exp $";
 
 #include <assert.h>
 #include <stdlib.h>
@@ -390,7 +390,10 @@ io_close(int fd)
        if (array_length(&io_evcache, sizeof (struct kevent)))  /* pending data in cache? */
                io_event_kqueue_commit_cache();
 #endif
-       return close(fd) == 0;  /* both epoll an kqueue will remove fd from all sets automatically */
+#ifdef IO_USE_EPOLL
+       epoll_ctl(io_masterfd, EPOLL_CTL_DEL, fd, NULL);
+#endif
+       return close(fd) == 0;  /* kqueue will remove fd from all sets automatically */
 }