1From 0a654c20e1b9324c57ba4116b52fb6ab33847e1d Mon Sep 17 00:00:00 2001 2From: Jeremy Kerr <jk@ozlabs.org> 3Date: Thu, 8 Aug 2013 17:16:31 +0800 4Subject: [PATCH] kexec: Implement clean restart for busybox init 5 6Signed-off-by: Jeremy Kerr <jk@ozlabs.org> 7--- 8 kexec.c | 3 ++- 9 1 file changed, 2 insertions(+), 1 deletion(-) 10 11diff --git a/kexec.c b/kexec.c 12index 2edb7df..b2a0c42 100644 13--- a/kexec.c 14+++ b/kexec.c 15@@ -27,6 +27,7 @@ 16 #include <fcntl.h> 17 #include <errno.h> 18 #include <syscall.h> 19+#include <signal.h> 20 #include <libfdt.h> 21 #include <getopt.h> 22 #include <sys/types.h> 23@@ -818,7 +819,7 @@ int main(int argc, char *argv[]) 24 sync(); 25 exec_kexec(); 26 } else { 27- execlp("shutdown", "shutdown", "-r", "now", NULL); 28+ kill(1, SIGQUIT); 29 } 30 31 return -1; 32-- 331.7.10.4 34 35