mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
Terminal: Start a new session before exec'ing the shell
This will put everything running inside the terminal in the same SID.
This commit is contained in:
parent
c303f55b60
commit
cf10f22488
1 changed files with 3 additions and 2 deletions
|
@ -69,8 +69,9 @@ static void run_command(int ptm_fd, String command)
|
|||
exit(1);
|
||||
}
|
||||
|
||||
// NOTE: It's okay if this fails.
|
||||
(void)ioctl(0, TIOCNOTTY);
|
||||
if (setsid() < 0) {
|
||||
perror("setsid");
|
||||
}
|
||||
|
||||
close(0);
|
||||
close(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue