Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 May 2009 18:00:48 +1000
From:      peterjeremy@optushome.com.au
To:        Andriy Gapon <avg@icyb.net.ua>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: shutdown_nice during boot
Message-ID:  <20090507080048.GA64648@server.vk2pj.dyndns.org>
In-Reply-To: <4A01B9A3.2030806@icyb.net.ua>
References:  <4A01B9A3.2030806@icyb.net.ua>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <avg@icyb.net.ua> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090507080048.GA64648>