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."
This commit is contained in:
Jiayuan Ren 2019-10-24 22:31:56 +00:00 committed by Simon Ser
parent 4162863c41
commit 8e0513410d

View file

@ -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) {