From b7828651babd20fb6cc11aed91721e103ccbb3e1 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Wed, 28 Nov 2018 16:06:07 -0600 Subject: supervise-daemon: fix type of exiting flag --- src/rc/supervise-daemon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/rc') diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c index 99159ef3..b655cd4b 100644 --- a/src/rc/supervise-daemon.c +++ b/src/rc/supervise-daemon.c @@ -121,6 +121,7 @@ const char *usagestring = NULL; static int healthcheckdelay = 0; static int healthchecktimer = 0; static volatile sig_atomic_t do_healthcheck = 0; +static volatile sig_atomic_t exiting = 0; static int nicelevel = 0; static int ionicec = -1; static int ioniced = 0; @@ -133,7 +134,6 @@ static int stdout_fd; static int stderr_fd; static char *redirect_stderr = NULL; static char *redirect_stdout = NULL; -static bool exiting = false; #ifdef TIOCNOTTY static int tty_fd = -1; #endif @@ -184,7 +184,7 @@ static void handle_signal(int sig) syslog(LOG_WARNING, "caught signal %d", sig); if (sig == SIGTERM) - exiting = true; + exiting = 1; /* Restore errno */ errno = serrno; if (! exiting) @@ -582,7 +582,7 @@ static void supervisor(char *exec, char **argv) if (respawn_count > respawn_max) { syslog(LOG_WARNING, "respawned \"%s\" too many times, exiting", exec); - exiting = true; + exiting = 1; continue; } } -- cgit v1.2.3