Bash can start without warnings

This commit is contained in:
Radon Rosborough 2021-08-12 18:14:08 -07:00
parent 62d67160d7
commit 02851bbeec
1 changed files with 2 additions and 0 deletions

View File

@ -59,6 +59,8 @@ int main(int argc, char **argv)
die("fork failed");
else if (exec_pid == 0) {
close(pty_master_fd);
if (setsid() < 0)
die("setsid failed");
int pty_slave_fd = open(pty_slave_name, O_RDWR);
if (pty_slave_fd < 0)
die("open failed");