summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1998-11-27 11:44:22 +0000
committerDavid Greenman <dg@FreeBSD.org>1998-11-27 11:44:22 +0000
commitf2b678d4cbe8e2f0ec7c077c83690cfb2cf3636c (patch)
tree05d1e7beffa70d317bdc9a0037ec049c402c36c7 /sys/kern
parentfcd70874b406a7dbffbe9a3c498a8a5fc1fa94a3 (diff)
Notes
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_synch.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 40fcdcc42caf..a659f709d124 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_synch.c 8.9 (Berkeley) 5/19/95
- * $Id: kern_synch.c,v 1.67 1998/11/26 14:05:58 bde Exp $
+ * $Id: kern_synch.c,v 1.68 1998/11/26 16:49:55 bde Exp $
*/
#include "opt_ktrace.h"
@@ -650,7 +650,8 @@ mi_switch()
* Check if the process exceeds its cpu resource allocation.
* If over max, kill it.
*/
- if (p->p_stat != SZOMB && p->p_runtime > p->p_limit->p_cpulimit) {
+ if (p->p_stat != SZOMB && p->p_limit->p_cpulimit != RLIM_INFINITY &&
+ p->p_runtime > p->p_limit->p_cpulimit) {
rlim = &p->p_rlimit[RLIMIT_CPU];
if (p->p_runtime / (rlim_t)1000000 >= rlim->rlim_max) {
killproc(p, "exceeded maximum CPU limit");