summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_exit.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 75076d7..5fe6faa 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_exit.c 8.7 (Berkeley) 2/12/94
- * $Id: kern_exit.c,v 1.4 1994/08/06 07:15:03 davidg Exp $
+ * $Id: kern_exit.c,v 1.5 1994/08/24 11:50:39 sos Exp $
*/
#include <sys/param.h>
@@ -369,8 +369,10 @@ loop:
#endif
if (p->p_stat == SZOMB) {
/* charge childs scheduling cpu usage to parent */
- if( curproc->p_pid != 1)
- curproc->p_estcpu += p->p_estcpu;
+ if (curproc->p_pid != 1) {
+ curproc->p_estcpu = min(curproc->p_estcpu +
+ p->p_estcpu, UCHAR_MAX);
+ }
retval[0] = p->p_pid;
#if defined(COMPAT_43) || defined(IBCS2)
OpenPOWER on IntegriCloud