master
joey 2007-02-21 09:12:20 +00:00
parent 160568ca2a
commit 67bc7ca8a1
1 changed files with 3 additions and 3 deletions

View File

@ -621,11 +621,11 @@ sub unlockwiki () { #{{{
sub commit_hook_enabled () { #{{{
open(COMMITLOCK, "+>$config{wikistatedir}/commitlock") ||
error ("cannot write to $config{wikistatedir}/commitlock: $!");
if (! flock(WIKILOCK, 1 | 4)) { # LOCK_SH | LOCK_NB to test
close WIKILOCK;
if (! flock(COMMITLOCK, 1 | 4)) { # LOCK_SH | LOCK_NB to test
close COMMITLOCK;
return 0;
}
close WIKILOCK;
close COMMITLOCK;
return 1;
} #}}}