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.