From owner-freebsd-bugs Mon Jan 20 10:00:06 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id KAA14653 for bugs-outgoing; Mon, 20 Jan 1997 10:00:06 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id KAA14617; Mon, 20 Jan 1997 10:00:02 -0800 (PST) Date: Mon, 20 Jan 1997 10:00:02 -0800 (PST) Message-Id: <199701201800.KAA14617@freefall.freebsd.org> To: freebsd-bugs Cc: From: Bruce Evans Subject: Re: kern/2535: filesize-cur resource limit reset to "infinity" Reply-To: Bruce Evans Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR kern/2535; it has been noted by GNATS. From: Bruce Evans To: davidn@unique.usn.blaze.net.au, FreeBSD-gnats-submit@FreeBSD.org Cc: Subject: Re: kern/2535: filesize-cur resource limit reset to "infinity" Date: Tue, 21 Jan 1997 04:52:38 +1100 >>Fix: > > Remove the following line in sys/kern/kern_exit.c? I have no > idea why this line is even there in the first place. :-) > Can anyone explain why? > >--- kern_exit.c.orig Wed Jan 15 14:55:26 1997 >+++ kern_exit.c Tue Jan 21 01:51:26 1997 >@@ -222,7 +222,7 @@ > sp->s_leader = NULL; > } > fixjobc(p, p->p_pgrp, 0); >- p->p_rlimit[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY; >+ /* p->p_rlimit[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY; */ rlimits are copy on write (implemented in software; grep for p_limit in kern_fork.c and kern_resource.c). The above code neglects to duplicate the struct before writing to it. Bruce