diff --git a/kernel/src/sys/waitpid.cpp b/kernel/src/sys/waitpid.cpp index 66834693..b52b9f91 100644 --- a/kernel/src/sys/waitpid.cpp +++ b/kernel/src/sys/waitpid.cpp @@ -61,7 +61,7 @@ Result sys_waitpid(Registers* regs, SyscallArgs args) else thread = child.value(); } - else + else // FIXME: Now that we have process groups, implement the cases where pid = 0 and pid < -1. return err(ENOTSUP); current->child_being_waited_for = {}; @@ -69,8 +69,8 @@ Result sys_waitpid(Registers* regs, SyscallArgs args) int status = (int)thread->status; u64 id = thread->id; - current->user_ticks_children += thread->user_ticks_self; - current->kernel_ticks_children += thread->kernel_ticks_self; + current->user_ticks_children += thread->user_ticks_self + thread->user_ticks_children; + current->kernel_ticks_children += thread->kernel_ticks_self + thread->kernel_ticks_children; thread->state = ThreadState::Dying; Scheduler::signal_reap_thread();