summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ratox.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ratox.c b/ratox.c
index 141953b..78fb665 100644
--- a/ratox.c
+++ b/ratox.c
@@ -165,7 +165,7 @@ static Tox_Options toxopt;
static uint8_t *passphrase;
static uint32_t pplen;
static uint8_t toilet[BUFSIZ];
-static int running = 1;
+static sig_atomic_t running = 1;
static int ipv6;
static int tcpflag;
static int proxyflag;
@@ -1296,7 +1296,6 @@ loop(void)
static void
initshutdown(int sig)
{
- printout("Shutting down...\n");
running = 0;
}
@@ -1307,6 +1306,8 @@ shutdown(void)
struct friend *f, *ftmp;
struct request *r, *rtmp;
+ printout("Shutting down...\n");
+
/* Friends */
for (f = TAILQ_FIRST(&friendhead); f; f = ftmp) {
ftmp = TAILQ_NEXT(f, entry);