mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-30 14:20:21 +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
Notes:
sideshowbarker
2024-07-19 10:38:51 +09:00
Author: https://github.com/awesomekling
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