mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
Kernel: Process::for_each_in_pgrp() should not include dead processes
We don't care about dead processes that were once members of a specific process group. This was causing us to try and send SIGINT to already-dead processes when pressing Ctrl+C in a terminal whose pgrp they were once in. Fixes #922.
This commit is contained in:
parent
43da941de5
commit
154d10e4e9
1 changed files with 1 additions and 1 deletions
|
@ -487,7 +487,7 @@ inline void Process::for_each_in_pgrp(pid_t pgid, Callback callback)
|
|||
ASSERT_INTERRUPTS_DISABLED();
|
||||
for (auto* process = g_processes->head(); process;) {
|
||||
auto* next_process = process->next();
|
||||
if (process->pgid() == pgid) {
|
||||
if (!process->is_dead() && process->pgid() == pgid) {
|
||||
if (callback(*process) == IterationDecision::Break)
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue