From owner-freebsd-current Tue Feb 6 11:38:24 2001 Delivered-To: freebsd-current@freebsd.org Received: from knight.cons.org (knight.cons.org [194.233.237.86]) by hub.freebsd.org (Postfix) with ESMTP id 7665137B401 for ; Tue, 6 Feb 2001 11:38:02 -0800 (PST) Received: (from cracauer@localhost) by knight.cons.org (8.11.1/8.11.1) id f16Jbrb09265; Tue, 6 Feb 2001 20:37:53 +0100 (CET) Date: Tue, 6 Feb 2001 20:37:52 +0100 From: Martin Cracauer To: Randell Jesup Cc: current@FreeBSD.ORG Subject: Re: Please review sh SIGSTOP fix Message-ID: <20010206203752.A9211@cons.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from rjesup@wgate.com on Tue, Feb 06, 2001 at 12:25:28PM -0500 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In , Randell Jesup wrote: > Martin Cracauer writes: > >would you please have a look at the following sh fix? My brain is a > >bit rusty and maybe I overlook a drawback. > > > >When a child is receiving SIGSTOP, eval continues with the next > >command. While that is correct for the interactive case (Control-Z > >and you get the prompt back), it is wrong for a shellscript, which > >just continues with the next command, never again waiting for the > >stopped child. Noted when childs from cronjobs were stopped, just to > >make more processes (by wosch). > > Careful - is this behavior used as a feature during boot when > starting services? I.e. you can ^Z and it will continue with the next > service; effectively backgrounding the service that's waiting. I.e. is > this a feature (perhaps accidental) that people assume and rely on? I hope not, thats definitivly a bug. Do you intent to continue the stopped proccess anytime? I don't think that are many cases where they were hung so that backgrounding them is needed but where they are not completely hung. > And > if so, is there another way to get the functionality, and is it important > to people? Control-C kills the currently starting process and Control-\ makes the whole /etc/rc return to singleuser-mode. That are the only documented ways to interact with /etc/rc. If you really want to background one process from /etc/rc, you would still do that by writing a wrapped that catches SIGINT and send SIGSTOP to its child (which is the original thing to start). Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ As far as I'm concerned, if something is so complicated that you can't ex- plain it in 10 seconds, then it's probably not worth knowing anyway -Calvin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message