mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-29 06:46:35 -04:00
changes requested by code review
This commit is contained in:
parent
a8da30c437
commit
39e226e923
7 changed files with 16 additions and 25 deletions
6
slave.c
6
slave.c
|
|
@ -10,6 +10,7 @@
|
|||
#include <signal.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#define LOG_MODULE "slave"
|
||||
|
|
@ -93,6 +94,11 @@ slave_exec(int ptmx, char *argv[], int err_fd, bool login_shell)
|
|||
goto err;
|
||||
}
|
||||
|
||||
if (ioctl(pts, TIOCSCTTY, 0) < 0) {
|
||||
LOG_ERRNO("failed to configure controlling terminal");
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (dup2(pts, STDIN_FILENO) == -1 ||
|
||||
dup2(pts, STDOUT_FILENO) == -1 ||
|
||||
dup2(pts, STDERR_FILENO) == -1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue