package/dhcp/S80dhcp-server: allow empty INTERFACES
[buildroot-gz.git] / package / kexec-lite / 0001-clean-restart.patch
blobfaaa93a046af7012306b9dc1ad9f139541f371a1
1 From 0a654c20e1b9324c57ba4116b52fb6ab33847e1d Mon Sep 17 00:00:00 2001
2 From: Jeremy Kerr <jk@ozlabs.org>
3 Date: Thu, 8 Aug 2013 17:16:31 +0800
4 Subject: [PATCH] kexec: Implement clean restart for busybox init
6 Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
7 ---
8 kexec.c | 3 ++-
9 1 file changed, 2 insertions(+), 1 deletion(-)
11 diff --git a/kexec.c b/kexec.c
12 index 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);
31 return -1;
32 --
33 1.7.10.4