aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/u_signal_names.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/u_signal_names.c b/libbb/u_signal_names.c
index bf984a44e..b82a706d8 100644
--- a/libbb/u_signal_names.c
+++ b/libbb/u_signal_names.c
@@ -143,7 +143,7 @@ int FAST_FUNC get_signum(const char *name)
unsigned i;
i = bb_strtou(name, NULL, 10);
- if (!errno)
+ if (!errno && i < NSIG) /* for shells, we allow 0 too */
return i;
if (strncasecmp(name, "SIG", 3) == 0)
name += 3;