This is usually done with flock. You want to get a shared lock for reading (which means you can have any number of processes reading the file at once) and an exclusive lock for writing (which means no other process can read or write at the same time).
In reply to Re: file reading / writing collisions
by kyle
in thread file reading / writing collisions
by simonodell
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |