What you're looking for is flock. Take a look at how merlyn implements a hit counter CGI script to see how to safely employ it.
Makeshifts last the longest.
In reply to Re: Writing to a log file without colliding
by Aristotle
in thread Writing to a log file without colliding
by cgraf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |