summaryrefslogtreecommitdiffstats
path: root/sys
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
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')
-rw-r--r--sys/kern/kern_acct.c14
-rw-r--r--sys/kern/kern_exit.c8
2 files changed, 13 insertions, 9 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),
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 7d0768b..31c31bb 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.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
/*
OpenPOWER on IntegriCloud