]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
bug #245 fixed.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 14 Apr 2009 08:27:16 +0000 (08:27 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 14 Apr 2009 08:27:16 +0000 (08:27 +0000)
git-svn-id: file:///svn/unbound/trunk@1596 be551aaa-1e26-0410-a405-d3ace91eadb9

contrib/unbound_munin_
doc/Changelog

index dab296e558a225b8f169586746feb0733883fc92..0754217ba3032b9e39ec904c459a480362970a26 100755 (executable)
@@ -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
index 77837288b4869512310d76ca5867318b5b9a45ec..175b5253fc583d5527b1d6e5399ef89f2f7fe90c 100644 (file)
@@ -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.