shutdown_nice during boot

Andriy Gapon avg at icyb.net.ua
Thu May 7 08:03:56 UTC 2009


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?

> 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


More information about the freebsd-arch mailing list