1 diff -Nur busybox-1.1.1/include/applets.h busybox-1.1.1-owrt/include/applets.h
2 --- busybox-1.1.1/include/applets.h 2006-03-22 22:16:24.000000000 +0100
3 +++ busybox-1.1.1-owrt/include/applets.h 2006-04-01 18:23:43.000000000 +0200
5 USE_IPTUNNEL(APPLET(iptunnel, iptunnel_main, _BB_DIR_BIN, _BB_SUID_NEVER))
6 USE_KILL(APPLET(kill, kill_main, _BB_DIR_BIN, _BB_SUID_NEVER))
7 USE_KILLALL(APPLET(killall, kill_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
8 +USE_KILLALL5(APPLET(killall5, kill_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
9 USE_KLOGD(APPLET(klogd, klogd_main, _BB_DIR_SBIN, _BB_SUID_NEVER))
10 USE_LASH(APPLET(lash, lash_main, _BB_DIR_BIN, _BB_SUID_NEVER))
11 USE_LAST(APPLET(last, last_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
12 diff -Nur busybox-1.1.1/include/usage.h busybox-1.1.1-owrt/include/usage.h
13 --- busybox-1.1.1/include/usage.h 2006-03-22 22:16:24.000000000 +0100
14 +++ busybox-1.1.1-owrt/include/usage.h 2006-04-01 18:22:53.000000000 +0200
15 @@ -1598,6 +1598,13 @@
16 #define killall_example_usage \
19 +#define killall5_trivial_usage \
21 +#define killall5_full_usage \
23 +#define killall5_example_usage \
26 #define klogd_trivial_usage \
28 #define klogd_full_usage \
29 diff -Nur busybox-1.1.1/procps/Config.in busybox-1.1.1-owrt/procps/Config.in
30 --- busybox-1.1.1/procps/Config.in 2006-03-22 22:16:25.000000000 +0100
31 +++ busybox-1.1.1-owrt/procps/Config.in 2006-04-01 18:22:53.000000000 +0200
33 specified commands. If no signal name is specified, SIGTERM is
36 +config CONFIG_KILLALL5
39 + depends on CONFIG_KILL
44 diff -Nur busybox-1.1.1/procps/kill.c busybox-1.1.1-owrt/procps/kill.c
45 --- busybox-1.1.1/procps/kill.c 2006-03-22 22:16:25.000000000 +0100
46 +++ busybox-1.1.1-owrt/procps/kill.c 2006-04-01 18:22:53.000000000 +0200
53 int kill_main(int argc, char **argv)
59 +#ifdef CONFIG_KILLALL5
60 + whichApp = (strcmp(bb_applet_name, "killall5") == 0)? KILLALL5 : whichApp;
63 /* Parse any options */
69 +#ifdef CONFIG_KILLALL5
70 + else if (whichApp == KILLALL5) {
71 + procps_status_t * p;
72 + pid_t myPid=getpid();
73 + while ((p = procps_scan(0)) != 0) {
74 + if (p->pid != 1 && p->pid != myPid && p->pid != p->ppid) {
75 + if (kill(p->pid, signo) != 0) {
76 + bb_perror_msg( "Could not kill pid '%d'", p->pid);