b01ed65ad2
andersen@busybox.net wrote: >Message: 4 >Modified Files: > init.c >Log Message: >Remove code for unsupported kernel versions Hmm. Current init.c have check >= 2.2.0 kernel one time too. Ok. Last patch removed this point and move common init code to new file for /init dir
22 lines
402 B
C
22 lines
402 B
C
#include <signal.h>
|
|
#include "busybox.h"
|
|
|
|
#include "init_shared.h"
|
|
|
|
|
|
extern int kill_init(int sig)
|
|
{
|
|
#ifdef CONFIG_FEATURE_INITRD
|
|
/* don't assume init's pid == 1 */
|
|
long *pid = find_pid_by_name("init");
|
|
if (!pid || *pid<=0) {
|
|
pid = find_pid_by_name("linuxrc");
|
|
if (!pid || *pid<=0)
|
|
bb_error_msg_and_die("no process killed");
|
|
}
|
|
return(kill(*pid, sig));
|
|
#else
|
|
return(kill(1, sig));
|
|
#endif
|
|
}
|