mirror of
https://github.com/mpv-player/mpv
synced 2025-01-10 17:09:45 +00:00
ipc: mark client sockets as CLOEXEC
I suppose it would have left the socket open if the client closed its FD.
This commit is contained in:
parent
1c66e03ae5
commit
810b37fc3f
@ -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){
|
||||
|
Loading…
Reference in New Issue
Block a user