From owner-freebsd-arch@FreeBSD.ORG Thu May 7 08:03:55 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3833106564A for ; Thu, 7 May 2009 08:03:55 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 3013F8FC14 for ; Thu, 7 May 2009 08:03:54 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA23499; Thu, 07 May 2009 11:03:45 +0300 (EEST) (envelope-from avg@icyb.net.ua) Received: from localhost.topspin.kiev.ua ([127.0.0.1] helo=edge.pp.kiev.ua) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1M1ya1-000OTc-Hr; Thu, 07 May 2009 11:03:45 +0300 Message-ID: <4A0295E0.4020609@icyb.net.ua> Date: Thu, 07 May 2009 11:03:44 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.21 (X11/20090406) MIME-Version: 1.0 To: peterjeremy@optushome.com.au References: <4A01B9A3.2030806@icyb.net.ua> <20090507080048.GA64648@server.vk2pj.dyndns.org> In-Reply-To: <20090507080048.GA64648@server.vk2pj.dyndns.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: freebsd-arch@freebsd.org Subject: Re: shutdown_nice during boot X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2009 08:03:56 -0000 on 07/05/2009 11:00 peterjeremy@optushome.com.au said the following: > On 2009-May-06 19:24:03 +0300, Andriy Gapon wrote: >> It's possible to re-enable SIGINT right after init is forked, but >> this way it will be delivered to init before it installs signal >> handlers and thus init would simply terminate resulting in "Going >> nowhere without my init!" panic. > > The best option would seem to be for init(8) to call sigprocmask(2) > immediately it starts up and block all signals. But a signal still can be delivered after init is exec-ed and before sigprocmask(2) is called or not? > This causes signals > to be deferred until they are unblocked. Once it sorts out its signal > handlers, it can then unblock the signals - at which point it will > receive any signals that were sent in the interim. > > Note that I haven't looked into init(8) to see if there are other > reasons why this approach would not be appropriate > -- Andriy Gapon