Copy process resource settings before modifying.

Candidate for 2.2.
This commit is contained in:
David Nugent 1997-01-21 16:37:01 +00:00
parent 0a98733422
commit 1273ebf576
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=21926

View File

@ -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