mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
Merge branch 'master' into async-ptmx
This commit is contained in:
commit
b4c810cf50
2 changed files with 10 additions and 1 deletions
2
server.c
2
server.c
|
|
@ -290,7 +290,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;
|
||||
}
|
||||
|
|
|
|||
9
slave.c
9
slave.c
|
|
@ -127,6 +127,15 @@ slave_spawn(int ptmx, int argc, char *const *argv,
|
|||
return -1;
|
||||
} else
|
||||
LOG_DBG("%s: successfully started", conf_shell);
|
||||
|
||||
int fd_flags;
|
||||
if ((fd_flags = fcntl(ptmx, F_GETFD)) < 0 ||
|
||||
fcntl(ptmx, F_SETFD, fd_flags | FD_CLOEXEC) < 0)
|
||||
{
|
||||
LOG_ERRNO("failed to set FD_CLOEXEC on ptmx");
|
||||
return -1;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue