Kernel: Use IteratorDecision in Process::for_each_in_pgrp()

This commit is contained in:
Andreas Kling 2019-08-22 21:12:55 +02:00
commit 06de0e670c
Notes: sideshowbarker 2024-07-19 12:33:52 +09:00
3 changed files with 3 additions and 3 deletions

View file

@ -456,7 +456,7 @@ inline void Process::for_each_in_pgrp(pid_t pgid, Callback callback)
for (auto* process = g_processes->head(); process;) {
auto* next_process = process->next();
if (process->pgid() == pgid) {
if (!callback(*process))
if (callback(*process) == IterationDecision::Break)
break;
}
process = next_process;