aboutsummaryrefslogtreecommitdiff
path: root/src/rc
diff options
context:
space:
mode:
Diffstat (limited to 'src/rc')
-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 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;