shutdown_nice during boot
Peter Jeremy
peterjeremy at optushome.com.au
Tue May 12 20:01:25 UTC 2009
On 2009-May-07 11:03:44 +0300, Andriy Gapon <avg at icyb.net.ua> wrote:
>on 07/05/2009 11:00 peterjeremy at optushome.com.au said the following:
>> 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.
>
>But a signal still can be delivered after init is exec-ed and before
>sigprocmask(2) is called or not?
True - there is still a window there where signal dispositiona are
inappropriate. Thinking about it some more, maybe the solution is to
change the test in shutdown_nice() - rather than testing for the
existence of initproc, it could test a sysctl variable that init
sets once it has its signal handlers in place. There's already a
kern.shutdown node so maybe "kern.shutdown.via_init". (This adds
the option for other subsystems to clear it if desired - maybe as
part of a watchdog function).
Maybe shutdown_nice should also initiate a 30-60 second timer that
invokes boot() whether or not init responds.
--
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/20090512/9ee4aae4/attachment.pgp
More information about the freebsd-arch
mailing list