From: Michel Stam Date: Thu, 2 Oct 2014 11:56:16 +0000 (+0000) Subject: Fix procd not handling rapid reboot signals very well X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fprocd.git;a=commitdiff_plain;h=396a82c551ab02871ec0e6f399941c9379258bdc 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 --- diff --git a/state.c b/state.c index e5f0015..bba5966 100644 --- a/state.c +++ b/state.c @@ -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;