From: ndparker <> Date: Sun, 22 Jul 2001 15:48:07 +0000 (+0000) Subject: improved (?) the master lock. Now, if first trial fails, the file will be locked... X-Git-Url: https://git.p6c8.net/selfforum.git/commitdiff_plain/cfbc3eb384902a6f27329b1109e815478741f6fe improved (?) the master lock. Now, if first trial fails, the file will be locked very violently --- diff --git a/selfforum-cgi/shared/Lock/API.pm b/selfforum-cgi/shared/Lock/API.pm index 21f3ecf..d832289 100644 --- a/selfforum-cgi/shared/Lock/API.pm +++ b/selfforum-cgi/shared/Lock/API.pm @@ -142,6 +142,15 @@ sub lock { $self -> lock ($self->LH_EXCL, $self -> timeout('master')) and $self -> _simple_lock (new Lock::Handle ($self->masterlock)) and return 1; + + # oops..? + # VERY violent way to set master lock + # + $self -> release; + + $self -> lock ($self->LH_EXCL, $self -> timeout('master')) and + $self -> _simple_lock (new Lock::Handle ($self->masterlock)) and + return 1; } ###########################################