aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
Diffstat (limited to 'procps')
-rw-r--r--procps/kill.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/procps/kill.c b/procps/kill.c
index 7ae5beead..975a3e8c5 100644
--- a/procps/kill.c
+++ b/procps/kill.c
@@ -201,7 +201,7 @@ int kill_main(int argc UNUSED_PARAM, char **argv)
201 pid_t sid; 201 pid_t sid;
202 procps_status_t* p = NULL; 202 procps_status_t* p = NULL;
203 /* compat: exitcode 2 is "no one was signaled" */ 203 /* compat: exitcode 2 is "no one was signaled" */
204 int ret = 2; 204 errors = 2;
205 205
206 /* Find out our session id */ 206 /* Find out our session id */
207 sid = getsid(pid); 207 sid = getsid(pid);
@@ -229,7 +229,7 @@ int kill_main(int argc UNUSED_PARAM, char **argv)
229 arg = *args++; 229 arg = *args++;
230 if (arg[0] != '-' || arg[1] != 'o') { 230 if (arg[0] != '-' || arg[1] != 'o') {
231 bb_error_msg("bad option '%s'", arg); 231 bb_error_msg("bad option '%s'", arg);
232 ret = 1; 232 errors = 1;
233 goto resume; 233 goto resume;
234 } 234 }
235 arg += 2; 235 arg += 2;
@@ -238,21 +238,21 @@ int kill_main(int argc UNUSED_PARAM, char **argv)
238 omit = bb_strtoi(arg, NULL, 10); 238 omit = bb_strtoi(arg, NULL, 10);
239 if (errno) { 239 if (errno) {
240 bb_error_msg("invalid number '%s'", arg); 240 bb_error_msg("invalid number '%s'", arg);
241 ret = 1; 241 errors = 1;
242 goto resume; 242 goto resume;
243 } 243 }
244 if (p->pid == omit) 244 if (p->pid == omit)
245 goto dont_kill; 245 goto dont_kill;
246 } 246 }
247 kill(p->pid, signo); 247 kill(p->pid, signo);
248 ret = 0; 248 errors = 0;
249 dont_kill: ; 249 dont_kill: ;
250 } 250 }
251 resume: 251 resume:
252 /* And let them continue */ 252 /* And let them continue */
253 if (signo != SIGSTOP && signo != SIGCONT) 253 if (signo != SIGSTOP && signo != SIGCONT)
254 kill(-1, SIGCONT); 254 kill(-1, SIGCONT);
255 return ret; 255 return errors;
256 } 256 }
257 257
258#if ENABLE_KILL || ENABLE_KILLALL 258#if ENABLE_KILL || ENABLE_KILLALL