Moved limit frobbing (and the resulting limcopy()) that occurs for
accounting to the accounting function so that this isn't needlessly done for some process exits. Reviewed by: bde,phk
This commit is contained in:
parent
9523f5c199
commit
b5afad7198
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=36676
@ -37,7 +37,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_acct.c 8.1 (Berkeley) 6/14/93
|
||||
* $Id: kern_acct.c,v 1.17 1997/09/21 22:00:04 gibbs Exp $
|
||||
* $Id: kern_acct.c,v 1.18 1997/11/06 19:29:07 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -229,7 +229,17 @@ acct_process(p)
|
||||
acct.ac_flag = p->p_acflag;
|
||||
|
||||
/*
|
||||
* Now, just write the accounting information to the file.
|
||||
* Eliminate any file size rlimit.
|
||||
*/
|
||||
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;
|
||||
|
||||
/*
|
||||
* Write the accounting information to the file.
|
||||
*/
|
||||
VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
|
||||
return (vn_rdwr(UIO_WRITE, vp, (caddr_t)&acct, sizeof (acct),
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_exit.c 8.7 (Berkeley) 2/12/94
|
||||
* $Id: kern_exit.c,v 1.65 1998/01/22 17:29:45 dyson Exp $
|
||||
* $Id: kern_exit.c,v 1.66 1998/04/06 08:26:03 phk Exp $
|
||||
*/
|
||||
|
||||
#include "opt_compat.h"
|
||||
@ -248,12 +248,6 @@ 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
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user