diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2002-11-25 22:12:28 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2002-11-25 22:12:28 +0000 |
commit | bb2e9d47f3c7c8172836b589292612e5f155f054 (patch) | |
tree | 551b8f0c0328b4458a1ab9e9dad19adb0ab4ab4f /procps/kill.c | |
parent | 5b110874dfa16dc41f31d8b34eef3d721573ca40 (diff) | |
download | busybox-w32-bb2e9d47f3c7c8172836b589292612e5f155f054.tar.gz busybox-w32-bb2e9d47f3c7c8172836b589292612e5f155f054.tar.bz2 busybox-w32-bb2e9d47f3c7c8172836b589292612e5f155f054.zip |
last_patch_67 from Vladimir N. Oleynik
Diffstat (limited to 'procps/kill.c')
-rw-r--r-- | procps/kill.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/procps/kill.c b/procps/kill.c index cf5c412a8..9b31f28d6 100644 --- a/procps/kill.c +++ b/procps/kill.c | |||
@@ -132,15 +132,17 @@ do_it_now: | |||
132 | if (quiet==0) | 132 | if (quiet==0) |
133 | error_msg( "%s: no process killed", *argv); | 133 | error_msg( "%s: no process killed", *argv); |
134 | } else { | 134 | } else { |
135 | for(; *pidList!=0; pidList++) { | 135 | long *pl; |
136 | if (*pidList==myPid) | 136 | |
137 | continue; | 137 | for(pl = pidList; *pl !=0 ; pl++) { |
138 | if (kill(*pidList, sig) != 0) { | 138 | if (*pl==myPid) |
139 | errors++; | 139 | continue; |
140 | if (quiet==0) | 140 | if (kill(*pl, sig) != 0) { |
141 | perror_msg( "Could not kill pid '%d'", *pidList); | 141 | errors++; |
142 | if (quiet==0) | ||
143 | perror_msg( "Could not kill pid '%d'", *pl); | ||
144 | } | ||
142 | } | 145 | } |
143 | } | ||
144 | } | 146 | } |
145 | free(pidList); | 147 | free(pidList); |
146 | argv++; | 148 | argv++; |