Next File Locking 2

File Locking

        use Fcntl ':flock';
        flock(FILEHANDLE, LOCK_EX) or die ...;
        if (flock(FILEHANDLE, LOCK_EX | LOCK_NB)) {
          # I have the lock
        } else {
          # I don't
        }
        flock(FILEHANDLE, LOCK_UN);


Next Copyright © 2003 M. J. Dominus