From 70126303021ddc3910b06801e83222bf6a4f9104 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 1 Sep 2009 13:57:45 +0100 Subject: Allow any valid numeric signal and not just what we define. --- src/rc/start-stop-daemon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c index 58bc23e3..5529e858 100644 --- a/src/rc/start-stop-daemon.c +++ b/src/rc/start-stop-daemon.c @@ -155,7 +155,8 @@ parse_signal(const char *sig) { "STOP", SIGSTOP }, { "TSTP", SIGTSTP }, { "TTIN", SIGTTIN }, - { "TTOU", SIGTTOU } + { "TTOU", SIGTTOU }, + { "NULL", 0 }, }; unsigned int i = 0; @@ -165,7 +166,7 @@ parse_signal(const char *sig) return -1; if (sscanf(sig, "%u", &i) == 1) { - if (i > 0 && i < sizeof(signallist) / sizeof(signallist[0])) + if (i >= 0 && i < NSIG) return i; eerrorx("%s: `%s' is not a valid signal", applet, sig); } -- cgit v1.2.3