diff options
-rw-r--r-- | sys/kern/kern_exit.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index dd9d6c4f0c0ac..ef3b94cce0843 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.40 1996/10/04 23:43:12 julian Exp $ + * $Id: kern_exit.c,v 1.41 1996/10/12 21:35:22 dyson Exp $ */ #include "opt_ktrace.h" @@ -222,6 +222,11 @@ exit1(p, rv) sp->s_leader = NULL; } fixjobc(p, p->p_pgrp, 0); + if (p->p_limit->p_refcnt > 1 && + (p->p_limit->p_lflags & PL_SHAREMOD) == 0) { + p->p_limit->p_refcnt--; + p->p_limit = limcopy(p->p_limit); + } p->p_rlimit[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY; (void)acct_process(p); #ifdef KTRACE |