mirror of
https://github.com/RGBCube/serenity
synced 2025-07-04 11: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
|
@ -733,8 +733,10 @@ RefPtr<Job> Shell::run_command(const AST::Command& command)
|
|||
perror("setpgid");
|
||||
|
||||
if (!m_is_subshell) {
|
||||
tcsetpgrp(STDOUT_FILENO, pgid);
|
||||
tcsetpgrp(STDIN_FILENO, pgid);
|
||||
if (tcsetpgrp(STDOUT_FILENO, pgid) != 0)
|
||||
perror("tcsetpgrp(OUT)");
|
||||
if (tcsetpgrp(STDIN_FILENO, pgid) != 0)
|
||||
perror("tcsetpgrp(IN)");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue