From a07736d2abd88053b2a169d3f3e15260363b3626 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 4 Aug 2001 23:32:36 +0000 Subject: 2001-08-04 Roland McGrath * proc.h (struct proc): New members p_rusage, p_child_rusage. * wait.c (rusage_add): New static function. (alert_parent): Use it to add dead child's p_rusage into parent's p_child_rusage. (S_proc_wait): Fill *RU out param with CHILD->p_rusage, not just zeros. Rewrote subfunction child_ready and its two callers into new subfunction reap to reduce duplicated code. --- proc/proc.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'proc/proc.h') diff --git a/proc/proc.h b/proc/proc.h index 39755986..0e83574d 100644 --- a/proc/proc.h +++ b/proc/proc.h @@ -1,5 +1,5 @@ /* Process server definitions - Copyright (C) 1992,93,94,95,96,99,2000 Free Software Foundation, Inc. + Copyright (C) 1992,93,94,95,96,99,2000,01 Free Software Foundation, Inc. This file is part of the GNU Hurd. @@ -65,6 +65,9 @@ struct proc vm_address_t p_argv, p_envp; int p_status; /* to return via wait */ int p_sigcode; + struct rusage p_rusage; /* my usage if I'm dead, to return via wait */ + + struct rusage p_child_rusage; /* accumulates p_rusage of all dead children */ unsigned int p_exec:1; /* has called proc_mark_exec */ unsigned int p_stopped:1; /* has called proc_mark_stop */ -- cgit v1.2.3