Next The Perl Hardware Store DC.pm Version 26

Semaphore Files

        tie %db => 'DB_File', $filename, ... or die ...;
        open FH, "<&=".tied(%db)->fd or die ...;
        flock FH, LOCK_EX or die ...;
         open S, "> $SEMAPHORE" or die ...;
         flock S, LOCK_EX or die...;
         tie %db => 'DB_File', $filename, ... or die ...;
         ...
         untie %db;
         close S;


Next Copyright © 2003 M. J. Dominus