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~6^2~161 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fde11f9a5c715c3deacd58f2263d39004ad771a9;p=i3%2Fi3 Bugfix: Don’t leak IPC socket to launched processes --- diff --git a/src/ipc.c b/src/ipc.c index 9e56fd0e..b4356fda 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -229,6 +229,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;