aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
Diffstat (limited to 'procps')
-rw-r--r--procps/kill.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/procps/kill.c b/procps/kill.c
index ed659afdc..140550018 100644
--- a/procps/kill.c
+++ b/procps/kill.c
@@ -96,10 +96,14 @@ int kill_main(int argc, char **argv)
96 if (arg[0] != '-') goto do_it_now; 96 if (arg[0] != '-') goto do_it_now;
97 } 97 }
98 98
99 /* -SIG */ 99 arg++; /* skip '-' */
100 signo = get_signum(&arg[1]); 100 if (argc > 1 && arg[0] == 's' && arg[1] == '\0') { /* -s SIG? */
101 argc--;
102 arg = *++argv;
103 } /* else it must be -SIG */
104 signo = get_signum(arg);
101 if (signo < 0) { /* || signo > MAX_SIGNUM ? */ 105 if (signo < 0) { /* || signo > MAX_SIGNUM ? */
102 bb_error_msg("bad signal name '%s'", &arg[1]); 106 bb_error_msg("bad signal name '%s'", arg);
103 return EXIT_FAILURE; 107 return EXIT_FAILURE;
104 } 108 }
105 arg = *++argv; 109 arg = *++argv;