diff options
author | Roy Marples <roy@marples.name> | 2009-09-04 13:32:59 +0100 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2009-09-04 13:32:59 +0100 |
commit | 6e485bde39dcb41e6e6b0874cc3a83027cf2b94e (patch) | |
tree | a1b777f8b9e044369c88b4292eb09fa18cb7ff00 /src | |
parent | 2ea1df634e356a580c5cf98df5e4e57da39dacbe (diff) |
Really fix --signal 0
Diffstat (limited to 'src')
-rw-r--r-- | src/rc/start-stop-daemon.c | 10 |
1 files 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; |