mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-27 18:20:02 -05:00
bug #245 fixed.
git-svn-id: file:///svn/unbound/trunk@1596 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
4ad2eb2549
commit
54bd0fff06
2 changed files with 13 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue