Next File Locking 5

Trick #1: Unlocking

        # Process A
        open DATAFILE, "+< $datafile" or die ...;
        flock DATAFILE, LOCK_EX;
        seek DATAFILE, 0, 2;
        print DATAFILE, $newdata;
        close DATAFILE;        
        # do something else for awhile


Next Copyright © 2003 M. J. Dominus