mirror of
https://github.com/RGBCube/serenity
synced 2025-07-04 09:07:34 +00:00
Shell: Make a new session at start if there's no active session
This commit is contained in:
parent
21f513fe0f
commit
a43d9c4fe0
2 changed files with 11 additions and 2 deletions
|
@ -209,6 +209,13 @@ int main(int argc, char** argv)
|
|||
|
||||
parser.parse(argc, argv);
|
||||
|
||||
if (getsid(getpid()) == 0) {
|
||||
if (setsid() < 0) {
|
||||
perror("setsid");
|
||||
// Let's just hope that it's ok.
|
||||
}
|
||||
}
|
||||
|
||||
shell->current_script = argv[0];
|
||||
|
||||
if (!skip_rc_files) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue