Accelerated daemon quitting

This commit is contained in:
Přemysl Eric Janouch 2018-10-17 06:08:11 +02:00
parent 13892fcd0e
commit efd500ca3c
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 8 additions and 4 deletions

View File

@ -2586,10 +2586,14 @@ on_termination_signal (EV_P_ ev_signal *handle, int revents)
(void) handle; (void) handle;
(void) revents; (void) revents;
// TODO: consider quitting right away if already quitting; if (ctx->quitting)
// considering that this may already happen in timeout, it should be OK; {
// see on_quit_timeout, just destroy all clients // Double C-c from the terminal accelerates the process
initiate_quit (ctx); LIST_FOR_EACH (struct client, iter, ctx->clients)
client_destroy (iter);
}
else
initiate_quit (ctx);
} }
static void static void