From: Andreas Ă–man Date: Thu, 21 Feb 2008 20:17:27 +0000 (+0000) Subject: close on exec, preparing for fork() stuff X-Git-Tag: 2.12~1187 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4c27648393e5b4d654dae98ca7441663cddc06f7;p=thirdparty%2Ftvheadend.git close on exec, preparing for fork() stuff --- diff --git a/dispatch.c b/dispatch.c index f4a8df0bc..b70b0776d 100644 --- a/dispatch.c +++ b/dispatch.c @@ -127,6 +127,8 @@ dispatch_addfd(int fd, void (*callback)(int events, void *opaque, int fd), { struct epoll_entry *e; + fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); + e = calloc(1, sizeof(struct epoll_entry)); e->callback = callback; e->opaque = opaque;