summaryrefslogtreecommitdiff
path: root/kill.c
diff options
context:
space:
mode:
authorErik Andersen2000-04-18 20:00:03 +0000
committerErik Andersen2000-04-18 20:00:03 +0000
commit0a64de9b4f7b3254008affe21b3ad4174c26f7f5 (patch)
treed1dc332e7cf63fdcc215b89044b334e17ce5abc5 /kill.c
parent229dd2b905e55ab486f5c77334453fdc61cda31b (diff)
downloadbusybox-0a64de9b4f7b3254008affe21b3ad4174c26f7f5.zip
busybox-0a64de9b4f7b3254008affe21b3ad4174c26f7f5.tar.gz
More little stuff.
-Erik
Diffstat (limited to 'kill.c')
-rw-r--r--kill.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kill.c b/kill.c
index db48424..93f02ea 100644
--- a/kill.c
+++ b/kill.c
@@ -222,12 +222,15 @@ extern int kill_main(int argc, char **argv)
}
#ifdef BB_KILLALL
else {
+ pid_t myPid=getpid();
/* Looks like they want to do a killall. Do that */
while (--argc >= 0) {
pid_t* pidList;
pidList = findPidByName( *argv);
- for(; pidList && pidList!=0; pidList++) {
+ for(; pidList && *pidList!=0; pidList++) {
+ if (*pidList==myPid)
+ continue;
if (kill(*pidList, sig) != 0)
fatalError( "Could not kill pid '%d': %s\n", *pidList, strerror(errno));
}