diff options
author | Eric Andersen | 2001-10-03 21:26:12 +0000 |
---|---|---|
committer | Eric Andersen | 2001-10-03 21:26:12 +0000 |
commit | 371ca19f5346d626f0c75c8d53aa5e3fb2e85c43 (patch) | |
tree | d5d5b8f9aec5eb15d45a43ea6a031dac4e05f39f /halt.c | |
parent | f0a4ac82166dbaedeae1d5f92821b700fc8fa17f (diff) | |
download | busybox-371ca19f5346d626f0c75c8d53aa5e3fb2e85c43.zip busybox-371ca19f5346d626f0c75c8d53aa5e3fb2e85c43.tar.gz |
Look for either "init" or "linuxrc" processes
Diffstat (limited to 'halt.c')
-rw-r--r-- | halt.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -29,8 +29,11 @@ extern int halt_main(int argc, char **argv) #ifdef BB_FEATURE_LINUXRC /* don't assume init's pid == 1 */ pid_t *pid = find_pid_by_name("init"); - if (!pid || *pid<=0) - error_msg_and_die("no process killed"); + if (!pid || *pid<=0) { + pid_t *pid = find_pid_by_name("linuxrc"); + if (!pid || *pid<=0) + error_msg_and_die("no process killed"); + } return(kill(*pid, SIGUSR1)); #else return(kill(1, SIGUSR1)); |