From: oetiker Date: Sun, 28 Sep 2008 21:36:46 +0000 (+0000) Subject: This patch removes an extra "SIGNALS" section in the rrdcached.pod and X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=598fb3cafa7a8140a083a5b9a21098fa800eab5f;p=rrdtool.git This patch removes an extra "SIGNALS" section in the rrdcached.pod and merges "[BUG] fixed hang in flush_file() introduced by per-file flush condition". -- kevin brintnall git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1542 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/doc/rrdcached.pod b/doc/rrdcached.pod index 8ed2979..c75b9e0 100644 --- a/doc/rrdcached.pod +++ b/doc/rrdcached.pod @@ -451,16 +451,6 @@ updates WILL BE LOST>. =back -=head1 SIGNALS - -=over 4 - -=item SIGINT and SIGTERM - -The daemon exits normally on receipt of either of these signals. - -=back - =head1 BUGS No known bugs at the moment. diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c index e2330a8..f92de21 100644 --- a/src/rrd_daemon.c +++ b/src/rrd_daemon.c @@ -814,10 +814,13 @@ static int flush_file (const char *filename) /* {{{ */ return (ENOENT); } - /* Enqueue at head */ - enqueue_cache_item (ci, HEAD); + if (ci->values_num > 0) + { + /* Enqueue at head */ + enqueue_cache_item (ci, HEAD); + pthread_cond_wait(&ci->flushed, &cache_lock); + } - pthread_cond_wait(&ci->flushed, &cache_lock); pthread_mutex_unlock(&cache_lock); return (0);