1 diff -urN busybox-dist/include/applets.h busybox/include/applets.h
2 --- busybox-dist/include/applets.h 2004-03-13 02:33:09.000000000 -0600
3 +++ busybox/include/applets.h 2004-03-16 09:45:29.000000000 -0600
6 APPLET(killall, kill_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
8 +#ifdef CONFIG_KILLALL5
9 + APPLET(killall5, kill_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
12 APPLET(klogd, klogd_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
14 diff -urN busybox-dist/include/usage.h busybox/include/usage.h
15 --- busybox-dist/include/usage.h 2004-03-13 02:33:09.000000000 -0600
16 +++ busybox/include/usage.h 2004-03-16 09:45:29.000000000 -0600
17 @@ -1389,6 +1389,13 @@
18 #define killall_example_usage \
21 +#define killall5_trivial_usage \
23 +#define killall5_full_usage \
25 +#define killall5_example_usage \
28 #define klogd_trivial_usage \
30 #define klogd_full_usage \
31 diff -urN busybox-dist/procps/Config.in busybox/procps/Config.in
32 --- busybox-dist/procps/Config.in 2003-12-24 00:02:11.000000000 -0600
33 +++ busybox/procps/Config.in 2004-03-16 09:45:29.000000000 -0600
35 specified commands. If no signal name is specified, SIGTERM is
38 +config CONFIG_KILLALL5
41 + depends on CONFIG_KILL
46 diff -urN busybox-dist/procps/kill.c busybox/procps/kill.c
47 --- busybox-dist/procps/kill.c 2004-03-15 02:29:03.000000000 -0600
48 +++ busybox/procps/kill.c 2004-03-16 09:45:29.000000000 -0600
55 extern int kill_main(int argc, char **argv)
61 +#ifdef CONFIG_KILLALL5
62 + whichApp = (strcmp(bb_applet_name, "killall5") == 0)? KILLALL5 : whichApp;
65 /* Parse any options */
71 +#ifdef CONFIG_KILLALL5
72 + else if (whichApp == KILLALL5) {
73 + procps_status_t * p;
74 + pid_t myPid=getpid();
75 + while ((p = procps_scan(0)) != 0) {
76 + if (p->pid != 1 && p->pid != myPid && p->pid != p->ppid) {
77 + if (kill(p->pid, signo) != 0) {
78 + bb_perror_msg( "Could not kill pid '%d'", p->pid);