diff --git a/kernel/src/sys/waitpid.cpp b/kernel/src/sys/waitpid.cpp index f533768f..a5162a2f 100644 --- a/kernel/src/sys/waitpid.cpp +++ b/kernel/src/sys/waitpid.cpp @@ -64,7 +64,7 @@ Result sys_waitpid(Registers* regs, SyscallArgs args) check(current->child_being_waited_for != -1); target = TRY(Result::from_option(Scheduler::find_by_pid(current->child_being_waited_for), ESRCH)); - check(!target->dead()); + check(target->dead()); } else target = child.value();