From 8b238905d75a2165dbb7367c71cdddc8ba6c4719 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 12 Jul 2022 17:18:40 +0100 Subject: [PATCH] xwayland: Use os_socketpair_cloexec() We already have a helper for this; use it. Signed-off-by: Daniel Stone --- compositor/xwayland.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compositor/xwayland.c b/compositor/xwayland.c index abf7399a..6113fa51 100644 --- a/compositor/xwayland.c +++ b/compositor/xwayland.c @@ -111,13 +111,13 @@ spawn_xserver(void *user_data, const char *display, int abstract_fd, int unix_fd char *const *argp; bool ret; - if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, wayland_socket.fds) < 0) { + if (os_socketpair_cloexec(AF_UNIX, SOCK_STREAM, 0, wayland_socket.fds) < 0) { weston_log("wl connection socketpair failed\n"); return 1; } fdstr_update_str1(&wayland_socket); - if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, x11_wm_socket.fds) < 0) { + if (os_socketpair_cloexec(AF_UNIX, SOCK_STREAM, 0, x11_wm_socket.fds) < 0) { weston_log("X wm connection socketpair failed\n"); return 1; }