in reply to SOLVED [flock on Ubuntu 9.10]
You are using flock(FH, LOCK_EX) which will wait until the lock is available. Easy to see if you put a print before and after the flock.
Add the non-blocking flag to get an instantaneous read on the lock state: flock(FH, LOCK_EX|LOCK_NB). Import the constants with use Fcntl qw(:flock);.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: flock on Ubuntu 9.10
by poctob (Initiate) on Nov 14, 2009 at 03:09 UTC | |
by ikegami (Patriarch) on Nov 14, 2009 at 07:14 UTC |