From owner-freebsd-arch@FreeBSD.ORG Thu May 7 12:16:40 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 CEA141065672 for ; Thu, 7 May 2009 12:16:40 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from fallbackmx06.syd.optusnet.com.au (fallbackmx06.syd.optusnet.com.au [211.29.132.8]) by mx1.freebsd.org (Postfix) with ESMTP id 390EC8FC2E for ; Thu, 7 May 2009 12:16:39 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail35.syd.optusnet.com.au (mail35.syd.optusnet.com.au [211.29.133.51]) by fallbackmx06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n4780sZ6004182 for ; Thu, 7 May 2009 18:00:54 +1000 Received: from server.vk2pj.dyndns.org (c122-106-216-167.belrs3.nsw.optusnet.com.au [122.106.216.167]) by mail35.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n4780oj0013166 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 7 May 2009 18:00:51 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id n4780nfO064675; Thu, 7 May 2009 18:00:49 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id n4780mu8064674; Thu, 7 May 2009 18:00:48 +1000 (EST) (envelope-from peter) Date: Thu, 7 May 2009 18:00:48 +1000 From: peterjeremy@optushome.com.au To: Andriy Gapon Message-ID: <20090507080048.GA64648@server.vk2pj.dyndns.org> References: <4A01B9A3.2030806@icyb.net.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yrj/dFKFPuw6o+aM" Content-Disposition: inline In-Reply-To: <4A01B9A3.2030806@icyb.net.ua> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.19 (2009-01-05) 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 12:16:44 -0000 --yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. 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 --=20 Peter Jeremy --yrj/dFKFPuw6o+aM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAkoClTAACgkQ/opHv/APuIcA2wCeMnmQxUVK1t+H8+A8fBtoSowA Xo0AnRSxZ8wAqcee8IEixjTvWr4LneA5 =MSGv -----END PGP SIGNATURE----- --yrj/dFKFPuw6o+aM--