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=287b9c0554c6c531928435a60e3af688338c2de7;p=rrdtool-all.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@1542 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/doc/rrdcached.pod b/program/doc/rrdcached.pod index 8ed29794..c75b9e0e 100644 --- a/program/doc/rrdcached.pod +++ b/program/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/program/src/rrd_daemon.c b/program/src/rrd_daemon.c index e2330a8d..f92de212 100644 --- a/program/src/rrd_daemon.c +++ b/program/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);