]> git.p6c8.net - selfforum.git/blobdiff - selfforum-cgi/shared/Lock/API.pm
improved (?) the master lock. Now, if first trial fails, the file will be locked...
[selfforum.git] / selfforum-cgi / shared / Lock / API.pm
index 21f3ecfd8356474dd2ddca325d80178cb0afd33d..d832289ed5b86d0261ef9fc849e9c5285b2f74de 100644 (file)
@@ -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;
   }
 
   ###########################################

patrick-canterino.de