in reply to Do I need to lock log files?
Here's an interesting quote from the fopen manpage:
Depends on your OS, of course, but most should be safe, and do not necessarily need file locking (especially if each process is only writing a single line to the file!)If two separate processes open the same file for append, each process may write freely to the file without fear of destroying output being written by the other. The output from the two processes will be intermixed in the file in the order in which it is written.
|
|---|