Next File Locking 7

Trap #2: Failing to check for failure

        flock FH, LOCK_EX;
        # modify the data
        flock FH, LOCK_EX or die ...;
        if (flock FH, LOCK_EX) {
          # modify the file ...
        }


Next Copyright © 2003 M. J. Dominus