summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-09-04 13:32:59 +0100
committerRoy Marples <roy@marples.name>2009-09-04 13:32:59 +0100
commit6e485bde39dcb41e6e6b0874cc3a83027cf2b94e (patch)
treea1b777f8b9e044369c88b4292eb09fa18cb7ff00
parent2ea1df634e356a580c5cf98df5e4e57da39dacbe (diff)
downloadopenrc-6e485bde39dcb41e6e6b0874cc3a83027cf2b94e.tar.gz
openrc-6e485bde39dcb41e6e6b0874cc3a83027cf2b94e.tar.bz2
openrc-6e485bde39dcb41e6e6b0874cc3a83027cf2b94e.tar.xz
Really fix --signal 0
-rw-r--r--src/rc/start-stop-daemon.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c
index f0f4795..a005cfd 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;