projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix spelling errors.
[oweals/busybox.git]
/
poweroff.c
diff --git
a/poweroff.c
b/poweroff.c
index 7f9abf14a34daf566ce9dd93fd0eed9e1ebfb5cb..bc8e67716f412e25f918055b78b193e8563af50f 100644
(file)
--- a/
poweroff.c
+++ b/
poweroff.c
@@
-26,6
+26,10
@@
extern int poweroff_main(int argc, char **argv)
{
extern int poweroff_main(int argc, char **argv)
{
+#ifdef BB_FEATURE_LINUXRC
/* don't assume init's pid == 1 */
/* don't assume init's pid == 1 */
- exit(kill(findInitPid(), SIGUSR2));
+ exit(kill(*(findPidByName("init")), SIGUSR2));
+#else
+ exit(kill(1, SIGUSR2));
+#endif
}
}