aboutsummaryrefslogtreecommitdiff
path: root/procps/kill.c
diff options
context:
space:
mode:
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 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++;