From owner-freebsd-rc@FreeBSD.ORG Thu Jun 17 20:03:44 2010 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4EC61065673 for ; Thu, 17 Jun 2010 20:03:44 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 7740D8FC17 for ; Thu, 17 Jun 2010 20:03:44 +0000 (UTC) Received: (qmail 31059 invoked by uid 399); 17 Jun 2010 20:03:42 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 17 Jun 2010 20:03:42 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4C1A7F99.3030807@FreeBSD.org> Date: Thu, 17 Jun 2010 13:03:37 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.9) Gecko/20100330 Thunderbird/3.0.4 MIME-Version: 1.0 To: Jilles Tjoelker References: <20100608214526.GB9977@stack.nl> In-Reply-To: <20100608214526.GB9977@stack.nl> X-Enigmail-Version: 1.0.1 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-rc@FreeBSD.org Subject: Re: ugly output of wait_for_pids with kill(1) builtin X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jun 2010 20:03:44 -0000 On 06/08/10 14:45, Jilles Tjoelker wrote: > I'm experimenting with making kill an sh(1) builtin (*). Adding this feature is probably relevant to the goal of making sh a more robust system shell, and having given it some thought I think I agree with your reasoning under * below. I'm just concerned that with things like the tab completion that you just added that we're going down the road of making sh more of an interactive shell, which I'm not sure is the right direction. > However, this > makes wait_for_pids's output ugly: the kill builtin is too fast and > almost always detects the process is still running or a zombie, so the > Waiting for PIDS message appears for all daemons. I'm guessing it only appears very briefly, right? I'm also not sure what you mean by "too fast" here. The sending of the kill command happens in _run_rc_killcmd, not wait_for_pids. It's probably also worth mentioning that out of 8 services that get stopped at shutdown time I currently get the "waiting for pids" message for 2-4 of them already, so I'm not sure what it is that you're concerned about. > Any ideas how to avoid this? I'm not sure why you're concerned about the "Waiting for PIDS" message, is your only issue that you find it aesthetically unappealing? > One such option would be some sort of modification to pwait(1). What are you suggesting? Doug > (*) Reasons to do this: > 1. allow kill %1 > 2. make sure kill is found before $PATH > 3. make kill work even if fork is impossible > -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/