mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-01 15:43:36 +03: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: https://github.com/SerenityOS/serenity/commit/cf10f224886
@ -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…
Reference in New Issue
Block a user