diff options
author | wm4 <wm4@nowhere> | 2020-05-15 16:18:01 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-05-15 16:37:41 +0200 |
commit | 810b37fc3f538b33d73546c76e9b4c86e7b906a5 (patch) | |
tree | 62fc207991915d4c8768f0029df1d3d2838eeaa1 /input | |
parent | 1c66e03ae5e995b567cb252a853927f0de1dbba5 (diff) | |
download | mpv-810b37fc3f538b33d73546c76e9b4c86e7b906a5.tar.bz2 mpv-810b37fc3f538b33d73546c76e9b4c86e7b906a5.tar.xz |
ipc: mark client sockets as CLOEXEC
I suppose it would have left the socket open if the client closed its
FD.
Diffstat (limited to 'input')
-rw-r--r-- | input/ipc-unix.c | 2 |
1 files changed, 2 insertions, 0 deletions
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){ |