summaryrefslogtreecommitdiff
path: root/procps/kill.c
diff options
context:
space:
mode:
authorGlenn L McGrath2002-11-25 22:12:28 +0000
committerGlenn L McGrath2002-11-25 22:12:28 +0000
commitbb2e9d47f3c7c8172836b589292612e5f155f054 (patch)
tree551b8f0c0328b4458a1ab9e9dad19adb0ab4ab4f /procps/kill.c
parent5b110874dfa16dc41f31d8b34eef3d721573ca40 (diff)
downloadbusybox-bb2e9d47f3c7c8172836b589292612e5f155f054.zip
busybox-bb2e9d47f3c7c8172836b589292612e5f155f054.tar.gz
last_patch_67 from Vladimir N. Oleynik
Diffstat (limited to 'procps/kill.c')
-rw-r--r--procps/kill.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/procps/kill.c b/procps/kill.c
index cf5c412..9b31f28 100644
--- a/procps/kill.c
+++ b/procps/kill.c
@@ -132,15 +132,17 @@ do_it_now:
if (quiet==0)
error_msg( "%s: no process killed", *argv);
} else {
- for(; *pidList!=0; pidList++) {
- if (*pidList==myPid)
- continue;
- if (kill(*pidList, sig) != 0) {
- errors++;
- if (quiet==0)
- perror_msg( "Could not kill pid '%d'", *pidList);
+ long *pl;
+
+ for(pl = pidList; *pl !=0 ; pl++) {
+ if (*pl==myPid)
+ continue;
+ if (kill(*pl, sig) != 0) {
+ errors++;
+ if (quiet==0)
+ perror_msg( "Could not kill pid '%d'", *pl);
+ }
}
- }
}
free(pidList);
argv++;