From 810b37fc3f538b33d73546c76e9b4c86e7b906a5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 15 May 2020 16:18:01 +0200 Subject: ipc: mark client sockets as CLOEXEC I suppose it would have left the socket open if the client closed its FD. --- input/ipc-unix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/input/ipc-unix.c b/input/ipc-unix.c index abef0972d9..cd788e0061 100644 --- a/input/ipc-unix.c +++ b/input/ipc-unix.c @@ -272,6 +272,8 @@ bool mp_ipc_start_anon_client(struct mp_ipc_ctx *ctx, struct mpv_handle *h, int pair[2]; if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair)) return false; + mp_set_cloexec(pair[0]); + mp_set_cloexec(pair[1]); struct client_arg *client = talloc_ptrtype(NULL, client); *client = (struct client_arg){ -- cgit v1.2.3