diff options
Diffstat (limited to 'src/commands.cpp')
-rw-r--r-- | src/commands.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index 5ffd870da..5011b7d61 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -24,11 +24,17 @@ using namespace std; #include <sys/errno.h> #include <sys/ioctl.h> #include <sys/utsname.h> + #ifdef USE_KQUEUE #include <sys/types.h> #include <sys/event.h> #include <sys/time.h> #endif + +#ifdef USE_EPOLL +#include <sys/epoll.h> +#endif + #include <cstdio> #include <time.h> #include <string> @@ -68,6 +74,10 @@ using namespace std; extern int kq; #endif +#ifdef USE_EPOLL +int ep; +#endif + extern int MODCOUNT; extern std::vector<Module*> modules; extern std::vector<ircd_module*> factory; @@ -921,6 +931,16 @@ void handle_quit(char **parameters, int pcnt, userrec *user) log(DEBUG,"kqueue: Failed to remove user from queue!"); } #endif +#ifdef USE_EPOLL + struct epoll_event ev; + ev.events = EPOLLIN | EPOLLET; + ev.data.fd = user->fd; + int i = epoll_ctl(ep, EPOLL_CTL_DEL, user->fd, &ev); + if (i < 0) + { + log(DEBUG,"epoll: List deletion failure!"); + } +#endif shutdown(user->fd,2); close(user->fd); } |