projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pavel Roskin <proski@gnu.org> just found a nasty memory
[oweals/busybox.git]
/
init
/
halt.c
diff --git
a/init/halt.c
b/init/halt.c
index ecc6e8f3014afe5e06edac0bfc2aef920a60c5f1..2ca36d038eb1d653fe0e60a8548adece67e7ea1a 100644
(file)
--- a/
init/halt.c
+++ b/
init/halt.c
@@
-1,3
+1,4
@@
+/* vi: set sw=4 ts=4: */
/*
* Mini halt implementation for busybox
*
/*
* Mini halt implementation for busybox
*
@@
-23,9
+24,12
@@
#include "internal.h"
#include <signal.h>
#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 */
+ return(kill(*(findPidByName("init")), SIGUSR1));
+#else
+ return(kill(1, SIGUSR1));
+#endif
}
}
-