Request Lock



  sub RequestLock {
    local ($n) = 0;
    while (mkdir($LockDirectory, 0555) == 0) {
        $! == 17 || &AbortScript("can't make $LockDirectory: $!\n");  # EEXIST == 17 is OK, try later.
        $n++ < 30 || &AbortScript("timed out waiting for $LockDirectory\n");
        sleep(1);
    }
  }

 

Last edited August 18, 1997
Return to WelcomeVisitors