server: FD_CLOEXEC is a file descriptor flag, not a file status flag

This commit is contained in:
Daniel Eklöf 2019-11-03 01:11:02 +01:00
parent e09bda322a
commit 8d9ad96b52
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -291,7 +291,7 @@ server_init(const struct config *conf, struct fdm *fdm, struct wayland *wayl)
unlink(sock_path);
if (fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | FD_CLOEXEC) < 0) {
if (fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC) < 0) {
LOG_ERRNO("failed to set FD_CLOEXEC on socket");
goto err;
}