From 8e0513410dd16a3f3b1d07745b613e5ae6141bd0 Mon Sep 17 00:00:00 2001 From: Jiayuan Ren Date: Thu, 24 Oct 2019 22:31:56 +0000 Subject: adding O_RDWR flag in the open() According to the manual of open: "The argument flags must include one of the following access modes: O_RDONLY, O_WRONLY, or O_RDWR." --- src/wayland-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/wayland-server.c b/src/wayland-server.c index c4c52ed..5f466a0 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.c @@ -1435,7 +1435,7 @@ wl_socket_lock(struct wl_socket *socket) snprintf(socket->lock_addr, sizeof socket->lock_addr, "%s%s", socket->addr.sun_path, LOCK_SUFFIX); - socket->fd_lock = open(socket->lock_addr, O_CREAT | O_CLOEXEC, + socket->fd_lock = open(socket->lock_addr, O_CREAT | O_CLOEXEC | O_RDWR, (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP)); if (socket->fd_lock < 0) { -- cgit v1.3.1