From d0e63556c4fd10cf3627b6e5c292a1f178a5578f Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Fri, 16 Feb 2024 13:26:29 -0500 Subject: Add proc_getchildren_rusage RPC and track rusage for children and descendants Message-ID: <20240216182630.5770-2-flaviocruz@gmail.com> --- proc/wait.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'proc/wait.c') diff --git a/proc/wait.c b/proc/wait.c index 4551d289..a31b0e73 100644 --- a/proc/wait.c +++ b/proc/wait.c @@ -156,6 +156,8 @@ alert_parent (struct proc *p) { /* We accumulate the aggregate usage stats of all our dead children. */ rusage_add (&p->p_parent->p_child_rusage, &p->p_rusage); + /* ... and descendants. */ + rusage_add (&p->p_parent->p_child_rusage, &p->p_child_rusage); send_signal (p->p_parent->p_msgport, SIGCHLD, CLD_EXITED, p->p_parent->p_task); -- cgit v1.2.3