Shell: Announce job events at the right times

This fixes a duplicate message when running `jobs` for the first time
after a job has been moved to the background.
Also actually announces background exits now :^)
This commit is contained in:
AnotherTest 2020-09-01 19:03:19 +04:30 committed by Andreas Kling
commit 7b5ead64a5
Notes: sideshowbarker 2024-07-19 02:48:55 +09:00
2 changed files with 3 additions and 8 deletions

View file

@ -73,7 +73,7 @@ static inline Vector<Command> join_commands(Vector<Command> left, Vector<Command
command.should_wait = first_in_right.should_wait && last_in_left.should_wait;
command.is_pipe_source = first_in_right.is_pipe_source;
command.should_notify_if_in_background = first_in_right.should_wait && last_in_left.should_notify_if_in_background;
command.should_notify_if_in_background = first_in_right.should_notify_if_in_background || last_in_left.should_notify_if_in_background;
Vector<Command> commands;
commands.append(left);