From: Florian Forster Date: Sat, 21 Jun 2008 16:23:22 +0000 (+0200) Subject: src/rrdd.c: Signal the queue thread then shutting down. X-Git-Url: https://git.octo.it/?p=rrdd.git;a=commitdiff_plain;h=459813380fc8c77d91801c503d9502e13965bd3c src/rrdd.c: Signal the queue thread then shutting down. Prevents a deadlock when shutting down. --- diff --git a/src/rrdd.c b/src/rrdd.c index 71674bc..23f4328 100644 --- a/src/rrdd.c +++ b/src/rrdd.c @@ -652,7 +652,10 @@ static int cleanup (void) /* {{{ */ do_shutdown++; + RRDD_LOG (LOG_DEBUG, "cleanup: Joining queue_thread.."); + pthread_cond_signal (&cache_cond); pthread_join (queue_thread, /* return = */ NULL); + RRDD_LOG (LOG_DEBUG, "cleanup: done"); closelog ();