From 0a64de9b4f7b3254008affe21b3ad4174c26f7f5 Mon Sep 17 00:00:00 2001 From: Erik Andersen Date: Tue, 18 Apr 2000 20:00:03 +0000 Subject: More little stuff. -Erik --- procps/kill.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'procps') diff --git a/procps/kill.c b/procps/kill.c index db4842457..93f02eab4 100644 --- a/procps/kill.c +++ b/procps/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)); } -- cgit v1.2.3