mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 17:48:37 +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
Notes:
sideshowbarker
2024-07-19 09:50:08 +09:00
Author: https://github.com/awesomekling
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