Oops. Forgot the usleep.c file.
[oweals/busybox.git] / halt.c
diff --git a/halt.c b/halt.c
index ecc6e8f3014afe5e06edac0bfc2aef920a60c5f1..81d24cf2de7ffc631b85bae6767a7650117a0172 100644 (file)
--- a/halt.c
+++ b/halt.c
@@ -1,3 +1,4 @@
+/* vi: set sw=4 ts=4: */
 /*
  * Mini halt implementation for busybox
  *
 #include "internal.h"
 #include <signal.h>
 
-extern int
-halt_main(int argc, char ** argv)
+extern int halt_main(int argc, char **argv)
 {
-    exit( kill(1, SIGUSR1));
+#ifdef BB_FEATURE_LINUXRC
+       /* don't assume init's pid == 1 */
+       exit(kill(findPidByName("init"), SIGUSR1));
+#else
+       exit(kill(1, SIGUSR1));
+#endif
 }
-