FWIW, I have successfully used Perl flock on both Unix (many flavors) and Windows for many years. Essentially, I use the approach described here. I found that using a separate zero-size lock file to (advisory) lock the (whole) file being updated, rather than attempting to lock the file being changed, improved robustness and overall simplicity of the code, especially on Windows, where I ran into a number of glitches when attempting to lock the file being modified.
In reply to Re: flock and read-ahead buffering on input
by eyepopslikeamosquito
in thread flock and read-ahead buffering on input
by dbooth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |