init: improve handling of signals racing with each other
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 3 Dec 2019 12:48:55 +0000 (13:48 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 3 Dec 2019 13:05:32 +0000 (14:05 +0100)
commit356f23de20b48382f5a2c5db29dc4f6dc9d10289
tree9e1658b4c6930c713f7fe417832a586a2b9e5a55
parent113c776f4d2ce4ead7c2d11a3ca62adeec9a2e34
init: improve handling of signals racing with each other

Before this change, a request to reboot could be "overwritten" by e.g.
SIGHUP.

function                                             old     new   delta
init_main                                            709     793     +84
packed_usage                                       33273   33337     +64
run_actions                                          109     117      +8
stop_handler                                          87      88      +1
check_delayed_sigs                                   340     335      -5
run                                                  214     198     -16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/2 up/down: 157/-21)           Total: 136 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
init/init.c