From 49522abb5adebeedc25f7eb7e152c308ef04b32d Mon Sep 17 00:00:00 2001 From: John Crispin Date: Thu, 2 Oct 2014 19:39:56 +0200 Subject: [PATCH] make procd handle ctrl+alt+del Signed-off-by: John Crispin --- procd.c | 5 +++++ signal.c | 1 + 2 files changed, 6 insertions(+) diff --git a/procd.c b/procd.c index ad80284..f5640c3 100644 --- a/procd.c +++ b/procd.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -69,6 +70,10 @@ int main(int argc, char **argv) else procd_state_next(); uloop_run(); + uloop_done(); + + if (getpid() == 1) + procd_shutdown(RB_AUTOBOOT); return 0; } diff --git a/signal.c b/signal.c index 74cabcb..12eedc8 100644 --- a/signal.c +++ b/signal.c @@ -91,4 +91,5 @@ void procd_signal(void) sigaction(SIGHUP, &sa_dummy, NULL); sigaction(SIGKILL, &sa_dummy, NULL); sigaction(SIGSTOP, &sa_dummy, NULL); + reboot(RB_DISABLE_CAD); } -- 2.25.1