From owner-freebsd-current@FreeBSD.ORG Sat Dec 3 02:42:42 2005 Return-Path: X-Original-To: freebsd-current@FreeBSD.ORG Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9577316A422 for ; Sat, 3 Dec 2005 02:42:42 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail1.fluidhosting.com (mail1.fluidhosting.com [204.14.90.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 8E1AD43D60 for ; Sat, 3 Dec 2005 02:42:40 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 8286 invoked by uid 399); 3 Dec 2005 02:42:39 -0000 Received: from localhost (HELO ?192.168.0.5?) (dougb@dougbarton.net@127.0.0.1) by localhost with SMTP; 3 Dec 2005 02:42:39 -0000 Message-ID: <4391061D.3050105@FreeBSD.org> Date: Fri, 02 Dec 2005 18:42:37 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (Windows/20051025) MIME-Version: 1.0 To: Andrey Chernov , freebsd-current@FreeBSD.ORG References: <200512022006.jB2K67AK078509@repoman.freebsd.org> <20051203004057.GA20872@nagual.pp.ru> <4390EFB6.3090307@FreeBSD.org> <20051203012324.GA34147@nagual.pp.ru> <4390F9A2.208@FreeBSD.org> <20051203020831.GA34619@nagual.pp.ru> <43910010.2050702@FreeBSD.org> <20051203023304.GA34859@nagual.pp.ru> In-Reply-To: <20051203023304.GA34859@nagual.pp.ru> X-Enigmail-Version: 0.93.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Re: cvs commit: src/etc rc rc.shutdown rc.subr src/etc/rc.d localpkg src/sys/sys param.h X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2005 02:42:43 -0000 Andrey Chernov wrote: > On Fri, Dec 02, 2005 at 06:16:48PM -0800, Doug Barton wrote: >>> Do you mean that scripts without .sh runs in >>> the subshell and not damage main shell? >> Yes, that's what I mean. Once again, sorry I wasn't clear. I've been staring >> at this for too long now. :) > > Just to clarify it finally. You state that there is a big difference > between system /etc/rc.d scripts (without .sh) which all runs in the > single shell No. The way things stand now, all scripts named foo.sh are sourced into the main shell, and everything else (base scripts, local scripts, whatever) are all run in subshells. You could answer this for yourself by looking in /etc/rc.subr if it's still not clear. >> I should have mentioned in my last message that I did take a quick look at >> the script itself, and didn't see anything that should be a problem, but as > > /usr/bin/limits is the problem there because it change limits for whole > shell, not for command which just invoked. If all scripts runs in the same > shell, all subsequential of them will be affected. Assuming you're right about that, then you should do something like what I suggested in the patch I sent so that the script gets installed as apache instead of apache.sh. hth, Doug