summaryrefslogtreecommitdiff
path: root/Shell/Builtin.cpp
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2020-12-10 17:32:18 +0330
committerAndreas Kling <kling@serenityos.org>2020-12-10 16:20:39 +0100
commita2879f53c80b5b20b8cafd76176447ee0ca8f959 (patch)
treeabbb168fd346aa8bb8a964600c47bf3e916c8a0c /Shell/Builtin.cpp
parent350b2c6d9e88b9f1d5e2cf2c01db2ffc64fa086e (diff)
downloadserenity-a2879f53c80b5b20b8cafd76176447ee0ca8f959.zip
Shell: Restore the terminal PGID before printing out job status on exit
This fixes the assert tripping when interrupting a foreground job. Also make `bg` mark the job as 'should announce exit'.
Diffstat (limited to 'Shell/Builtin.cpp')
-rw-r--r--Shell/Builtin.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Shell/Builtin.cpp b/Shell/Builtin.cpp
index 9c2ab6d06f..a0a7c539c4 100644
--- a/Shell/Builtin.cpp
+++ b/Shell/Builtin.cpp
@@ -98,6 +98,7 @@ int Shell::builtin_bg(int argc, const char** argv)
}
job->set_running_in_background(true);
+ job->set_should_announce_exit(true);
job->set_is_suspended(false);
dbgln("Resuming {} ({})", job->pid(), job->cmd());