src/rrdd.c: Signal the queue thread then shutting down.
authorFlorian Forster <octo@leeloo.home.verplant.org>
Sat, 21 Jun 2008 16:23:22 +0000 (18:23 +0200)
committerFlorian Forster <octo@leeloo.home.verplant.org>
Sat, 21 Jun 2008 16:23:22 +0000 (18:23 +0200)
Prevents a deadlock when shutting down.

src/rrdd.c

index 71674bc..23f4328 100644 (file)
@@ -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 ();