summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Shell/Builtin.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Shell/Builtin.cpp b/Shell/Builtin.cpp
index 5cef22a449..8e547f0c0d 100644
--- a/Shell/Builtin.cpp
+++ b/Shell/Builtin.cpp
@@ -349,6 +349,9 @@ int Shell::builtin_fg(int argc, const char** argv)
dbg() << "Resuming " << job->pid() << " (" << job->cmd() << ")";
fprintf(stderr, "Resuming job %" PRIu64 " - %s\n", job->job_id(), job->cmd().characters());
+ tcsetpgrp(STDOUT_FILENO, job->pgid());
+ tcsetpgrp(STDIN_FILENO, job->pgid());
+
if (killpg(job->pgid(), SIGCONT) < 0) {
perror("killpg");
return 1;