diff options
author | Roy Marples <roy@marples.name> | 2009-09-01 13:57:45 +0100 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2009-09-01 13:57:45 +0100 |
commit | 70126303021ddc3910b06801e83222bf6a4f9104 (patch) | |
tree | 662c364ac74c6d6c1cfc6e17ad6f4c023558fdff | |
parent | 51907c7368164906742027a13e4f292840a7475b (diff) |
Allow any valid numeric signal and not just what we define.
-rw-r--r-- | src/rc/start-stop-daemon.c | 5 |
1 files 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); } |