Hi, I'm trying to lock a file exclusively so that other process has no access to it I'm using:
flock($fh,2); It does work, and in the second process I use the same procedure. The problem is that I can't set a time limit for the lock. I want to try to capture the lock, and if unsuccessful, the process should give up and exit. It just so happens that the second process waits and waits until the first process finishes. Any idea as to how to impose a time limit on the lock ? I have tried the following and other loops but it just freezes execution at flock unless (flock($fh,2)) { exit; } # lock ok Any help is welcome Thanks Edgar. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]