On 23 January 2003, Greg Stein said:
I've done this before, and it gets a bit tricky when you're dealing with
different processes. The big problem is that two processes will open a file
for appending at the same time. They each think they're at the end of the
file, they both write, and one ends up overwriting the other.
Huh? Pardon my ignorance, but I thought the whole point of Unix'
append mode was to avoid this -- ie. I thought that the kernel always
guarantees you're at eof when you write() to a file opened with
O_APPEND. Thus two processes should be able to append to the same file
and never overwrite each other's data, and as long as each write() call
ends with \n, there should be zero confusion for a human reading the
log.
Or is this a bit of Unix folklore that I've learned or remembered
wrongly?
Greg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 14 02:13:33 2006