summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9896b57)
raw | patch | inline | side by side (parent: 9896b57)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 12 Oct 2007 16:22:51 +0000 (18:22 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 12 Oct 2007 16:22:51 +0000 (18:22 +0200) |
..before returning from the shutdown function.
src/rrdtool.c | patch | blob | history |
diff --git a/src/rrdtool.c b/src/rrdtool.c
index 06d9763968292de2a4ab85ffa3628bd4e72fa3e4..7002dcfbd61050616d9e308def88ff48b67895f3 100644 (file)
--- a/src/rrdtool.c
+++ b/src/rrdtool.c
rrd_cache_flush (-1);
pthread_mutex_unlock (&cache_lock);
+ /* Wait for all the values to be written to disk before returning. */
+ if (queue_thread != 0)
+ {
+ pthread_join (queue_thread, NULL);
+ queue_thread = 0;
+ DEBUG ("rrdtool plugin: queue_thread exited.");
+ }
+
pthread_mutex_lock (&queue_lock);
do_shutdown = 1;
pthread_cond_signal (&queue_cond);