Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
On a Unix and equivalent systems if the file you are writing to was opened with the O_APPEND flag, writes are guaranteed to be atomic regardless of size, unless the file is a pipe or FIFO, in which case atomicity is guaranteed only if the write size is PIPE_BUF or fewer bytes in length. So sayeth the Single Unix Specification on the write system call:
If the O_APPEND flag of the file status flags is set, the file offset shall be set to the end of the file prior to each write and no intervening file modification operation shall occur between changing the file offset and the write operation....On most Linux systems, PIPE_BUF is 4096. See the write(2) man page on your system and the Single Unix Specification for more. Tom Moertel : Blog / Talks / CPAN / LectroTest / PXSL / Coffee / Movie Rating Decoder In reply to Re^3: Looking for a simple multiprocess-enabled logging module
by tmoertel
|
|