Merge branch 'master' of git.dolda2000.com:/srv/git/r/ashd
[ashd.git] / lib / mtio-epoll.c
index 940ba3d..8510c5e 100644 (file)
@@ -17,6 +17,7 @@
 */
 
 #include <stdlib.h>
+#include <fcntl.h>
 #include <string.h>
 #include <sys/epoll.h>
 #include <errno.h>
@@ -163,6 +164,7 @@ void ioloop(void)
     time_t now, timeout;
     
     epfd = epoll_create(128);
+    fcntl(epfd, F_SETFD, FD_CLOEXEC);
     for(bl = blockers; bl; bl = nbl) {
        nbl = bl->n;
        if(regfd(bl))