diff options
-rw-r--r-- | procd.c | 5 | ||||
-rw-r--r-- | signal.c | 1 |
2 files changed, 6 insertions, 0 deletions
@@ -15,6 +15,7 @@ #include <sys/wait.h> #include <sys/types.h> #include <sys/stat.h> +#include <sys/reboot.h> #include <unistd.h> #include <getopt.h> @@ -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; } @@ -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); } |