aboutsummaryrefslogtreecommitdiff
path: root/procps/kill.c
diff options
context:
space:
mode:
authorerik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-04-18 20:00:03 +0000
committererik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-04-18 20:00:03 +0000
commit19666e3281793c285534240304639d9915819b48 (patch)
treed1dc332e7cf63fdcc215b89044b334e17ce5abc5 /procps/kill.c
parent6bdc693ceb9670c765cc294410d845c33e256d6e (diff)
downloadbusybox-w32-19666e3281793c285534240304639d9915819b48.tar.gz
busybox-w32-19666e3281793c285534240304639d9915819b48.tar.bz2
busybox-w32-19666e3281793c285534240304639d9915819b48.zip
More little stuff.
-Erik git-svn-id: svn://busybox.net/trunk/busybox@475 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'procps/kill.c')
-rw-r--r--procps/kill.c5
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 }