Another update from Larry:
[oweals/busybox.git] / reboot.c
index fc01ea004fe52e67abdf1abbcbfd105bf3e59caf..74d2cf6434c62856f721dc34600e2664b7899181 100644 (file)
--- a/reboot.c
+++ b/reboot.c
  *
  */
 
-#include "internal.h"
+#include "busybox.h"
 #include <signal.h>
 
 extern int reboot_main(int argc, char **argv)
 {
+#ifdef BB_FEATURE_LINUXRC
        /* don't assume init's pid == 1 */
-       exit(kill(findPidByName("init"), SIGINT));
+       return(kill(*(find_pid_by_name("init")), SIGTERM));
+#else
+       return(kill(1, SIGTERM));
+#endif
 }
 
 /*