|
@@ -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)");
|
|
|
}
|
|
|
}
|
|
|
|