diff options
| author | Florian Westphal <fw@strlen.de> | 2005-09-04 13:38:59 +0000 |
|---|---|---|
| committer | Florian Westphal <fw@strlen.de> | 2005-09-04 13:38:59 +0000 |
| commit | 565129f99290006eae51aec18a993bdf0077a7e0 (patch) | |
| tree | e36f8f2e97452ec1166441cb293e7ad6cd397035 | |
| parent | b2a3bc3257ecc4917ed4f43ff4f2d3b04812aadb (diff) | |
| download | ngircd-565129f99290006eae51aec18a993bdf0077a7e0.tar.gz ngircd-565129f99290006eae51aec18a993bdf0077a7e0.zip | |
io_close(): explicitly remove fd from epoll set
| -rw-r--r-- | src/ngircd/io.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ngircd/io.c b/src/ngircd/io.c index 96672da6..5c8d8c8f 100644 --- a/src/ngircd/io.c +++ b/src/ngircd/io.c @@ -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 */ } |