summaryrefslogtreecommitdiff
path: root/lib/exe/indexer.php
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2011-02-06 15:21:22 +0000
committerChristopher Smith <chris@jalakai.co.uk>2011-02-06 15:21:22 +0000
commitb842a02804e6c492963978620e61739485b7287f (patch)
tree00995d07d0c146bbba38a72fa6086547db949080 /lib/exe/indexer.php
parent3893df8e5068f411ba16c2e37096e47c4ad102f2 (diff)
parent26497271fdd53b972af0b3a4411b6ce41a0629c0 (diff)
downloadrpg-b842a02804e6c492963978620e61739485b7287f.tar.gz
rpg-b842a02804e6c492963978620e61739485b7287f.tar.bz2
Merge branch 'master' of git@github.com:splitbrain/dokuwiki
Diffstat (limited to 'lib/exe/indexer.php')
-rw-r--r--lib/exe/indexer.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php
index eec8c968c..010ca7987 100644
--- a/lib/exe/indexer.php
+++ b/lib/exe/indexer.php
@@ -149,6 +149,7 @@ function runIndexer(){
}
// try to aquire a lock
+ $run = 0;
$lock = $conf['lockdir'].'/_indexer.lock';
while(!@mkdir($lock,$conf['dmode'])){
usleep(50);
@@ -156,7 +157,8 @@ function runIndexer(){
// looks like a stale lock - remove it
@rmdir($lock);
print "runIndexer(): stale lock removed".NL;
- }else{
+ }elseif($run++ = 1000){
+ // we waited 5 seconds for that lock
print "runIndexer(): indexer locked".NL;
return false;
}