From: Michael Stapelberg Date: Fri, 22 Jan 2010 23:34:29 +0000 (+0100) Subject: Bugfix: Don’t leak IPC socket to launched processes X-Git-Tag: 3.e~21 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f399c3ef9d0db8c95113b242e0c69498cf077669;p=i3%2Fi3 Bugfix: Don’t leak IPC socket to launched processes --- diff --git a/src/ipc.c b/src/ipc.c index 0bef2ea2..c048cdf7 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -228,6 +228,8 @@ int ipc_create_socket(const char *filename) { return -1; } + (void)fcntl(sockfd, F_SETFD, FD_CLOEXEC); + struct sockaddr_un addr; memset(&addr, 0, sizeof(struct sockaddr_un)); addr.sun_family = AF_LOCAL;