kernel: Include waited-for grandchildren in RUSAGE_CHILDREN's times
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b88da4811f
commit
28dd8194af
@ -61,7 +61,7 @@ Result<u64> sys_waitpid(Registers* regs, SyscallArgs args)
|
|||||||
else
|
else
|
||||||
thread = child.value();
|
thread = child.value();
|
||||||
}
|
}
|
||||||
else
|
else // FIXME: Now that we have process groups, implement the cases where pid = 0 and pid < -1.
|
||||||
return err(ENOTSUP);
|
return err(ENOTSUP);
|
||||||
|
|
||||||
current->child_being_waited_for = {};
|
current->child_being_waited_for = {};
|
||||||
@ -69,8 +69,8 @@ Result<u64> sys_waitpid(Registers* regs, SyscallArgs args)
|
|||||||
int status = (int)thread->status;
|
int status = (int)thread->status;
|
||||||
u64 id = thread->id;
|
u64 id = thread->id;
|
||||||
|
|
||||||
current->user_ticks_children += thread->user_ticks_self;
|
current->user_ticks_children += thread->user_ticks_self + thread->user_ticks_children;
|
||||||
current->kernel_ticks_children += thread->kernel_ticks_self;
|
current->kernel_ticks_children += thread->kernel_ticks_self + thread->kernel_ticks_children;
|
||||||
|
|
||||||
thread->state = ThreadState::Dying;
|
thread->state = ThreadState::Dying;
|
||||||
Scheduler::signal_reap_thread();
|
Scheduler::signal_reap_thread();
|
||||||
|
Loading…
Reference in New Issue
Block a user