projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Oops. Since dirent.h depends on BB_FEATURE_SH_TAB_COMPLETION, put it
[oweals/busybox.git]
/
poweroff.c
diff --git
a/poweroff.c
b/poweroff.c
index 7f9abf14a34daf566ce9dd93fd0eed9e1ebfb5cb..007099d4d298e12696421fcb838b61a3cf99aa2f 100644
(file)
--- a/
poweroff.c
+++ b/
poweroff.c
@@
-21,11
+21,15
@@
*
*/
*
*/
-#include "
internal
.h"
+#include "
busybox
.h"
#include <signal.h>
extern int poweroff_main(int argc, char **argv)
{
#include <signal.h>
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));
+ return(kill(*(find_pid_by_name("init")), SIGUSR2));
+#else
+ return(kill(1, SIGUSR2));
+#endif
}
}