From b5ad0c51c8d0a271665109ee0d6898a6cb0694c6 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 14 Oct 2015 16:17:42 +0100 Subject: [PATCH] Improve signals output --- src/libserver/worker_util.c | 4 ++-- src/rspamd.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libserver/worker_util.c b/src/libserver/worker_util.c index 47d85d6bc..5aff8883b 100644 --- a/src/libserver/worker_util.c +++ b/src/libserver/worker_util.c @@ -112,8 +112,8 @@ rspamd_worker_term_handler (struct rspamd_worker_signal_handler *sigh, void *arg sigh->worker->srv->server_pool->tag.tagname, sigh->worker->srv->server_pool->tag.uid, G_STRFUNC, - "terminating after receiving %s signal", - strsignal (sigh->signo)); + "terminating after receiving signal %s", + g_strsignal (sigh->signo)); wanna_die = 1; tv.tv_sec = 0; tv.tv_usec = 0; diff --git a/src/rspamd.c b/src/rspamd.c index 38d998289..f6c682be6 100644 --- a/src/rspamd.c +++ b/src/rspamd.c @@ -645,7 +645,7 @@ rspamd_term_handler (gint signo, short what, gpointer arg) struct rspamd_main *rspamd_main = arg; msg_info_main ("catch termination signal, waiting for children"); - rspamd_pass_signal (rspamd_main->workers, SIGTERM); + rspamd_pass_signal (rspamd_main->workers, signo); event_base_loopexit (rspamd_main->ev_base, NULL); } -- 2.39.5