Yes, you should use KM's method, the reasons he gives in his comment to the File Locking Tutorial are all valid.
flock-ing a separate file lets you lock several files at once, including files that cannot be locked as you don't have a file handle on them and is generally a cleaner design than locking the file you are using.
In reply to Re: Flocking .. insanity is close.
by mirod
in thread Flocking .. insanity is close.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |