summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1996-08-15 21:51:51 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1996-08-15 21:51:51 +0000
commit93c8bfe7407ee796d62971625964d37adab29945 (patch)
tree60388ed096dbf76bf367c634cfa8caaf6a7a2191 /sys
parent72aea76a13e3db17a5e79fa1e53890cac5cdf3d7 (diff)
Clear p_pctcpu when a process exit
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_exit.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index aa3177dbe6f..f3f9803db6b 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exit.c,v 1.6 1996/05/02 13:12:11 deraadt Exp $ */
+/* $OpenBSD: kern_exit.c,v 1.7 1996/08/15 21:51:50 tholo Exp $ */
/* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */
/*
@@ -239,6 +239,11 @@ exit1(p, rv)
ruadd(p->p_ru, &p->p_stats->p_cru);
/*
+ * clear %cpu usage during swap
+ */
+ p->p_pctcpu = 0;
+
+ /*
* Notify parent that we're gone.
*/
psignal(p->p_pptr, SIGCHLD);