From 686d6da799c3c81861121efd7fe0000c0b9dedd7 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 12 May 2014 22:34:24 +1000 Subject: [PATCH] Send shutdown messages to the listener thread on watchdog shutdown or signal handling --- src/ckpool.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ckpool.c b/src/ckpool.c index a8f979a3..0b642dc8 100644 --- a/src/ckpool.c +++ b/src/ckpool.c @@ -203,6 +203,7 @@ static void sighandler(int sig) join_pthread(global_ckp->pth_watchdog); /* First attempt, send a shutdown message */ + send_proc(&global_ckp->main, "shutdown"); send_proc(&global_ckp->generator, "shutdown"); send_proc(&global_ckp->stratifier, "shutdown"); send_proc(&global_ckp->connector, "shutdown"); @@ -345,6 +346,7 @@ static void *watchdog(void *arg) break; } } + send_proc(&ckp->main, "shutdown"); return NULL; }