[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Need logging facilities

From: <gward_at_mems-exchange.org>
Date: 2003-01-24 15:26:19 CET

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

This is an archived mail posted to the Subversion Dev mailing list.