mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 11:48:32 +00:00
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'.
This commit is contained in:
committed by
Andreas Kling
parent
350b2c6d9e
commit
a2879f53c8
@@ -871,6 +871,8 @@ RefPtr<Job> Shell::run_command(const AST::Command& command)
|
||||
job->on_exit = [this](auto job) {
|
||||
if (!job->exited())
|
||||
return;
|
||||
|
||||
restore_ios();
|
||||
if (job->is_running_in_background() && job->should_announce_exit())
|
||||
warnln("Shell: Job {} ({}) exited\n", job->job_id(), job->cmd().characters());
|
||||
else if (job->signaled() && job->should_announce_signal())
|
||||
|
||||
Reference in New Issue
Block a user