summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_acct.c
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1998-06-05 21:44:20 +0000
committerdg <dg@FreeBSD.org>1998-06-05 21:44:20 +0000
commit045446fee68d329879d16931b2dc25196f3ecead (patch)
tree06157ae09cef90b6c94de79d9ea5356ca1e271a1 /sys/kern/kern_acct.c
parent6ffbdd6b2ef5cc383625d4dfb241ed44ba5d5df3 (diff)
downloadFreeBSD-src-045446fee68d329879d16931b2dc25196f3ecead.zip
FreeBSD-src-045446fee68d329879d16931b2dc25196f3ecead.tar.gz
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
Diffstat (limited to 'sys/kern/kern_acct.c')
-rw-r--r--sys/kern/kern_acct.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c
index 72b2e92..11db4e9 100644
--- a/sys/kern/kern_acct.c
+++ b/sys/kern/kern_acct.c
@@ -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),
OpenPOWER on IntegriCloud