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

@ -1615,7 +1615,7 @@ pid_t Process::sys$setsid()
bool found_process_with_same_pgid_as_my_pid = false;
Process::for_each_in_pgrp(pid(), [&](auto&) {
found_process_with_same_pgid_as_my_pid = true;
return false;
return IterationDecision::Break;
});
if (found_process_with_same_pgid_as_my_pid)
return -EPERM;