summaryrefslogtreecommitdiffstats
path: root/init/signal_handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/signal_handler.c')
-rw-r--r--init/signal_handler.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/init/signal_handler.c b/init/signal_handler.c
index 3e5d136..f89d058 100644
--- a/init/signal_handler.c
+++ b/init/signal_handler.c
@@ -23,7 +23,7 @@
#include <sys/socket.h>
#include <sys/wait.h>
#include <cutils/sockets.h>
-#include <sys/reboot.h>
+#include <cutils/android_reboot.h>
#include "init.h"
#include "list.h"
@@ -83,8 +83,8 @@ static int wait_for_one_process(int block)
svc->flags |= SVC_DISABLED;
}
- /* disabled processes do not get restarted automatically */
- if (svc->flags & SVC_DISABLED) {
+ /* disabled and reset processes do not get restarted automatically */
+ if (svc->flags & (SVC_DISABLED | SVC_RESET) ) {
notify_service_state(svc->name, "stopped");
return 0;
}
@@ -96,9 +96,7 @@ static int wait_for_one_process(int block)
ERROR("critical process '%s' exited %d times in %d minutes; "
"rebooting into recovery mode\n", svc->name,
CRITICAL_CRASH_THRESHOLD, CRITICAL_CRASH_WINDOW / 60);
- sync();
- __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
- LINUX_REBOOT_CMD_RESTART2, "recovery");
+ android_reboot(ANDROID_RB_RESTART2, 0, "recovery");
return 0;
}
} else {