def unlock
      unless @file
        PEROBS.log.error "There is no current lock to release"
        return false
      end

      begin
        @file.flock(File::LOCK_UN)
        @file.fsync
        @file.close
        forced_unlock
        PEROBS.log.debug "Lock file #{@file_name} for PID #{$$} has been " +
          "released"
      rescue => e
        PEROBS.log.error "Releasing of lock file #{@file_name} failed: " +
          e.message
        return false
      end

      true
    end
def unlock
      unless @file
        PEROBS.log.error "There is no current lock to release"
        return false
      end

      begin
        @file.flock(File::LOCK_UN)
        @file.fsync
        @file.close
        forced_unlock
        PEROBS.log.debug "Lock file #{@file_name} for PID #{$$} has been " +
          "released"
      rescue => e
        PEROBS.log.error "Releasing of lock file #{@file_name} failed: " +
          e.message
        return false
      end

      true
    end
Release the lock again.