in reply to error message not working

perldoc -f flock says:

Two potentially non-obvious but traditional
"flock" semantics are that it waits indefinitely
until the lock is granted, ...

So it works alright it seems, it just waits until it will be allowed to flock the file instead of aborting with that error message.

Cheers, Sören

Replies are listed 'Best First'.
Re^2: error message not working
by rev_1318 (Chaplain) on Nov 30, 2004 at 12:44 UTC
    Actually no, it doesn't, because of the LOCK_NB, flock won't block but returns immediately. Of course, this only works on *nix-like systems, not on windows-like ones, so I'm guessing that's where the problem is.