From: Wouter Wijngaards Date: Tue, 14 Apr 2009 08:27:16 +0000 (+0000) Subject: bug #245 fixed. X-Git-Tag: release-1.3.0~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=54bd0fff06cc18f24f22ed86b034887f20ad879d;p=thirdparty%2Funbound.git bug #245 fixed. git-svn-id: file:///svn/unbound/trunk@1596 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/contrib/unbound_munin_ b/contrib/unbound_munin_ index dab296e55..0754217ba 100755 --- a/contrib/unbound_munin_ +++ b/contrib/unbound_munin_ @@ -123,6 +123,16 @@ get_value ( ) { get_state ( ) { # obtain lock for fetching the state # because there is a race condition in fetching and writing to file + + # see if the lock is stale, if so, take it + if test -f $lock ; then + pid="`cat $lock 2>&1`" + kill -0 "$pid" >/dev/null 2>&1 + if test $? -ne 0 -a "$pid" != $$ ; then + echo $$ >$lock + fi + fi + i=0 while test ! -f $lock || test "`cat $lock 2>&1`" != $$; do while test -f $lock; do diff --git a/doc/Changelog b/doc/Changelog index 77837288b..175b5253f 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +14 April 2009: Wouter + - bug #245: fix munin plugin, perform cleanup of stale lockfiles. + 9 April 2009: Wouter - Fix for removal of RSASHA256_NSEC3 protonumber from ldns. - ldns tarball updated.