aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
Diffstat (limited to 'toys')
-rw-r--r--toys/lsb/killall.c2
-rw-r--r--toys/posix/kill.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/toys/lsb/killall.c b/toys/lsb/killall.c
index 8870618b..119e01fa 100644
--- a/toys/lsb/killall.c
+++ b/toys/lsb/killall.c
@@ -68,7 +68,7 @@ void killall_main(void)
TT.signum = SIGTERM;
if (toys.optflags & FLAG_l) {
- sig_to_num(NULL);
+ list_signals();
return;
}
diff --git a/toys/posix/kill.c b/toys/posix/kill.c
index f8e86b67..ee68980b 100644
--- a/toys/posix/kill.c
+++ b/toys/posix/kill.c
@@ -67,8 +67,9 @@ void kill_main(void)
char *s = NULL;
if (signum>=0) s = num_to_sig(signum&127);
- puts(s ? s : "UNKNOWN");
- } else sig_to_num(NULL);
+ if (isdigit(**args)) puts(s ? s : "UNKNOWN");
+ else printf("%d\n", signum);
+ } else list_signals();
return;
}