summaryrefslogtreecommitdiffstats
path: root/signal.c
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-11-14 13:41:13 +0100
committerJohn Crispin <blogic@openwrt.org>2013-11-15 17:05:20 +0100
commit916f95cb58604038695347ee41a430d8ca1f0556 (patch)
tree5dbb52a6adaf28c6c6989ea37e6975aa52075160 /signal.c
parentf9d31edb8938341b9217ee4c14eb58111414eb97 (diff)
downloadunitd-916f95cb58604038695347ee41a430d8ca1f0556.tar
unitd-916f95cb58604038695347ee41a430d8ca1f0556.zip
debloat and reorganize code
split app into procd and init binaries remove log support, this is an external service now Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/signal.c b/signal.c
index ebaf7bc..74cabcb 100644
--- a/signal.c
+++ b/signal.c
@@ -19,8 +19,6 @@
#include "procd.h"
-static int preinit;
-
static void do_reboot(void)
{
LOG("reboot\n");
@@ -37,9 +35,6 @@ static void signal_shutdown(int signal, siginfo_t *siginfo, void *data)
int event = 0;
char *msg = NULL;
- if (preinit)
- do_reboot();
-
switch(signal) {
case SIGTERM:
event = RB_AUTOBOOT;
@@ -97,11 +92,3 @@ void procd_signal(void)
sigaction(SIGKILL, &sa_dummy, NULL);
sigaction(SIGSTOP, &sa_dummy, NULL);
}
-
-void procd_signal_preinit(void)
-{
- preinit = 1;
- sigaction(SIGTERM, &sa_shutdown, NULL);
- sigaction(SIGUSR1, &sa_shutdown, NULL);
- sigaction(SIGUSR2, &sa_shutdown, NULL);
-}