ash: allow "trap NUM [SIG]..." syntax
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 25 Jul 2017 18:06:17 +0000 (20:06 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 25 Jul 2017 18:06:17 +0000 (20:06 +0200)
commit86981e3ad2d03e77d1f668ac1603a041be448dae
treeb7474eb7ce7117a4bcc883b5da97463dbbd952f6
parentf1a5cb0548f647e628032ea8645c0d0d2d07b02f
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>
libbb/u_signal_names.c
procps/kill.c
shell/ash.c
shell/hush.c