shutdown_nice during boot

peterjeremy at optushome.com.au peterjeremy at optushome.com.au
Thu May 7 12:16:44 UTC 2009


On 2009-May-06 19:24:03 +0300, Andriy Gapon <avg at 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

-- 
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20090507/a19ab6f1/attachment.pgp


More information about the freebsd-arch mailing list