xwayland: Use os_socketpair_cloexec()

We already have a helper for this; use it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone 2022-07-12 17:18:40 +01:00 committed by Pekka Paalanen
parent 5dbe001661
commit 8b238905d7
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}