* ---------------------------------------------------
*/
+using namespace std;
+
+#include "inspircd_config.h"
#include "inspircd.h"
#include "inspircd_io.h"
#include "inspircd_util.h"
-#include "inspircd_config.h"
#include <unistd.h>
#include <sys/errno.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 <time.h>
#include <string>
#ifdef GCC3
#include "helperfuncs.h"
#include "hashcomp.h"
-using namespace std;
-
#ifdef USE_KQUEUE
extern int kq;
#endif
+#ifdef USE_EPOLL
+int ep;
+#endif
+
extern int MODCOUNT;
extern std::vector<Module*> modules;
extern std::vector<ircd_module*> factory;
extern int MaxWhoResults;
extern time_t nb_start;
-extern std::vector<int> fd_reap;
extern std::vector<std::string> module_names;
extern int boundPortCount;
log(DEBUG,"kqueue: Failed to remove user from queue!");
}
#endif
+#ifdef USE_EPOLL
+ struct epoll_event ev;
+ ev.events = EPOLLIN | EPOLLET;
+ ev.data.fd = old_fd;
+ int i = epoll_ctl(ep, EPOLL_CTL_DEL, old_fd, &ev);
+ if (i < 0)
+ {
+ log(DEBUG,"epoll: List deletion failure!");
+ }
+#endif
+
shutdown(old_fd,2);
close(old_fd);
}