aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-07-25 20:06:17 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-07-25 20:06:17 +0200
commit86981e3ad2d03e77d1f668ac1603a041be448dae (patch)
treeb7474eb7ce7117a4bcc883b5da97463dbbd952f6 /procps
parentf1a5cb0548f647e628032ea8645c0d0d2d07b02f (diff)
downloadbusybox-w32-86981e3ad2d03e77d1f668ac1603a041be448dae.tar.gz
busybox-w32-86981e3ad2d03e77d1f668ac1603a041be448dae.tar.bz2
busybox-w32-86981e3ad2d03e77d1f668ac1603a041be448dae.zip
ash: allow "trap NUM [SIG]..." syntax
While at it, make get_signum() return -1 for numeric strings >= NSIG. function old new delta trapcmd 292 306 +14 get_signum 295 300 +5 builtin_trap 413 412 -1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 19/-1) Total: 18 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'procps')
-rw-r--r--procps/kill.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/procps/kill.c b/procps/kill.c
index 5cff24475..09beefb2d 100644
--- a/procps/kill.c
+++ b/procps/kill.c
@@ -188,7 +188,7 @@ int kill_main(int argc UNUSED_PARAM, char **argv)
188 arg = *++argv; 188 arg = *++argv;
189 } /* else it must be -SIG */ 189 } /* else it must be -SIG */
190 signo = get_signum(arg); 190 signo = get_signum(arg);
191 if (signo < 0) { /* || signo > MAX_SIGNUM ? */ 191 if (signo < 0) {
192 bb_error_msg("bad signal name '%s'", arg); 192 bb_error_msg("bad signal name '%s'", arg);
193 return EXIT_FAILURE; 193 return EXIT_FAILURE;
194 } 194 }