From 396a82c551ab02871ec0e6f399941c9379258bdc Mon Sep 17 00:00:00 2001 From: Michel Stam Date: Thu, 2 Oct 2014 11:56:16 +0000 Subject: [PATCH 1/1] 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 --- state.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.11.0