Gossamer Forum
Quote Reply
flock
Is there any small script or way to check if the flock is working on the server machine.

a couple of lines code which should print the results that 'file lock is working on the server' and vice versa.

There are methods to check it practically, but I am looking for something that should print the results at the end.

Thanks,

Zeshan .
Quote Reply
Re: [zeshan] flock In reply to
If the server is a Unix variant it almost undoubtably supports file locking. I could be wrong, but I believe win2k/XP support flocking.


open (TEST, "<test.txt") or die $!;
flock (TEST, 2) or die $!;
close (TEST);

Philip
------------------
Limecat is not pleased.