From 6e485bde39dcb41e6e6b0874cc3a83027cf2b94e Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 4 Sep 2009 13:32:59 +0100 Subject: Really fix --signal 0 --- src/rc/start-stop-daemon.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c index f0f47950..a005cfde 100644 --- a/src/rc/start-stop-daemon.c +++ b/src/rc/start-stop-daemon.c @@ -649,7 +649,7 @@ start_stop_daemon(int argc, char **argv) char *name = NULL; char *pidfile = NULL; char *retry = NULL; - int sig = 0; + int sig = -1; int nicelevel = 0; bool background = false; bool makepidfile = false; @@ -886,8 +886,8 @@ start_stop_daemon(int argc, char **argv) else if (exec) *--argv = exec; - if (stop || sig != 0) { - if (sig == 0) + if (stop || sig != -1) { + if (sig == -1) sig = SIGTERM; if (!*argv && !pidfile && !name && !uid) eerrorx("%s: --stop needs --exec, --pidfile," @@ -990,8 +990,8 @@ start_stop_daemon(int argc, char **argv) } margv = nav ? nav : argv; - if (stop || sig) { - if (sig == 0) + if (stop || sig != -1) { + if (sig == -1) sig = SIGTERM; if (!stop) oknodo = true; -- cgit v1.2.3