Static-ify a variable. make du work with all the human-readable variants
[oweals/busybox.git] / reboot.c
index 53a3520e1173d4683884a3ce99ecb9e3e42e39c7..3e5f2382c1cf363e1205e5452f4fa08598c21486 100644 (file)
--- a/reboot.c
+++ b/reboot.c
@@ -1,3 +1,4 @@
+/* vi: set sw=4 ts=4: */
 /*
  * Mini reboot implementation for busybox
  *
  *
  */
 
-#include "internal.h"
+#include "busybox.h"
 #include <signal.h>
 
-extern int
-reboot_main(int argc, char ** argv)
+extern int reboot_main(int argc, char **argv)
 {
-       exit( kill(1, SIGUSR2));
+#ifdef BB_FEATURE_LINUXRC
+       /* don't assume init's pid == 1 */
+       return(kill(*(find_pid_by_name("init")), SIGINT));
+#else
+       return(kill(1, SIGINT));
+#endif
 }
+
+/*
+Local Variables:
+c-file-style: "linux"
+c-basic-offset: 4
+tab-width: 4
+End:
+*/