Examples for Linux and Mac OS X where one process safely writes to a file that other processes are reading.