Also, don't unlock a locked file, ever, unless you know what you're doing - just close it and the lock will go away.
I'm inexperienced with flock and am now wondering what's going on here. Do you have an URL handy that explains why you don't unlock a file prior to closing. Or... *brainflash* buffering? Unlocking a handle doesn't flush the buffer so it introduces a race condition unless the handle is either hot (and autoflushed) or has been pre-flushed?
In reply to Re^2: Writing to files
by diotalevi
in thread Writing to files
by rxguil
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |