diff options
author | sin <sin@2f30.org> | 2014-09-26 16:54:25 +0100 |
---|---|---|
committer | sin <sin@2f30.org> | 2014-09-26 16:54:25 +0100 |
commit | e1aa1132ef821c2068b7ec7cc20936b63611e051 (patch) | |
tree | 1e9a2d72604fe92324355a8ac0de1d69f08484c7 /ratox.c | |
parent | 926b69de44057351e1af1316a4093ba0ff619412 (diff) |
Just flag the signal, nothing more
Diffstat (limited to 'ratox.c')
-rw-r--r-- | ratox.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); |