diff options
author | Michel Stam <m.stam@fugro.nl> | 2014-10-02 13:56:16 +0200 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-10-02 19:08:39 +0200 |
commit | 396a82c551ab02871ec0e6f399941c9379258bdc (patch) | |
tree | 2e383d48a1a2059e743350c062c6b7d6ffc4de58 | |
parent | c1a558f7d0c1e6c1ffa5a47d557a7b45205eef1d (diff) | |
download | unitd-396a82c551ab02871ec0e6f399941c9379258bdc.tar unitd-396a82c551ab02871ec0e6f399941c9379258bdc.zip |
Fix procd not handling rapid reboot signals very well
When keeping ctrl-alt-del pressed, or when running;
while true; do
/sbin/reboot
done
effectively the procd shutdown cycle gets into an undefined state,
Signed-off-by: Michel Stam <m.stam@fugro.nl>
-rw-r--r-- | state.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -94,6 +94,8 @@ void procd_state_next(void) void procd_shutdown(int event) { + if (state >= STATE_SHUTDOWN) + return; DEBUG(2, "Shutting down system with event %x\n", event); reboot_event = event; state = STATE_SHUTDOWN; |