From: Tobias Oetiker Date: Mon, 5 Mar 2012 16:49:01 +0000 (+0000) Subject: fix flush race in rrdcached -- Christian Hitz X-Git-Tag: 1.4.8~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba19ea752c9d4bc364356ca768a2896cd1c3857d;p=thirdparty%2Frrdtool-1.x.git fix flush race in rrdcached -- Christian Hitz git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.4/program@2282 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c index 17153ce9..4dfe35c2 100644 --- a/src/rrd_daemon.c +++ b/src/rrd_daemon.c @@ -292,7 +292,9 @@ static int handle_request_help (HANDLER_PROTO); static void sig_common (const char *sig) /* {{{ */ { RRDD_LOG(LOG_NOTICE, "caught SIG%s", sig); - state = FLUSHING; + if (state == RUNNING) { + state = FLUSHING; + } pthread_cond_broadcast(&flush_cond); pthread_cond_broadcast(&queue_cond); } /* }}} void sig_common */