diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-04-18 20:00:03 +0000 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-04-18 20:00:03 +0000 |
commit | 0a64de9b4f7b3254008affe21b3ad4174c26f7f5 (patch) | |
tree | d1dc332e7cf63fdcc215b89044b334e17ce5abc5 /procps | |
parent | 229dd2b905e55ab486f5c77334453fdc61cda31b (diff) | |
download | busybox-w32-0a64de9b4f7b3254008affe21b3ad4174c26f7f5.tar.gz busybox-w32-0a64de9b4f7b3254008affe21b3ad4174c26f7f5.tar.bz2 busybox-w32-0a64de9b4f7b3254008affe21b3ad4174c26f7f5.zip |
More little stuff.
-Erik
Diffstat (limited to 'procps')
-rw-r--r-- | procps/kill.c | 5 |
1 files changed, 4 insertions, 1 deletions
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) | |||
222 | } | 222 | } |
223 | #ifdef BB_KILLALL | 223 | #ifdef BB_KILLALL |
224 | else { | 224 | else { |
225 | pid_t myPid=getpid(); | ||
225 | /* Looks like they want to do a killall. Do that */ | 226 | /* Looks like they want to do a killall. Do that */ |
226 | while (--argc >= 0) { | 227 | while (--argc >= 0) { |
227 | pid_t* pidList; | 228 | pid_t* pidList; |
228 | 229 | ||
229 | pidList = findPidByName( *argv); | 230 | pidList = findPidByName( *argv); |
230 | for(; pidList && pidList!=0; pidList++) { | 231 | for(; pidList && *pidList!=0; pidList++) { |
232 | if (*pidList==myPid) | ||
233 | continue; | ||
231 | if (kill(*pidList, sig) != 0) | 234 | if (kill(*pidList, sig) != 0) |
232 | fatalError( "Could not kill pid '%d': %s\n", *pidList, strerror(errno)); | 235 | fatalError( "Could not kill pid '%d': %s\n", *pidList, strerror(errno)); |
233 | } | 236 | } |