httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Querna <c...@force-elite.com>
Subject Re: svn commit: r109866 - /httpd/httpd/trunk/modules/loggers/mod_log_config.c
Date Tue, 07 Dec 2004 03:53:35 GMT
Roy T. Fielding wrote:
> -1 (veto) -- the message is copied to a single buffer for the write
> because that is the only way to guarantee an atomic append under
> Unix without locks, thus preventing multiple children from scribbling
> over each other's log entries.  Please revert this change ASAP.
> 
> ....Roy

I have committed r110069 which reverts r109866, based on your -1 vote.

I do not agree that using writev() would allow multiple children from 
scribbling over each other's log entries.  I have not been able to cause 
this to happen on my local machines.

Having looked at the writev() implementation in FreeBSD 5.2, it will 
lock the entire range of a file to be written with writev, and will not 
allow another process to write over that range.  The Linux 2.6 
implementation uses similar locking.

According to IEEE Std 1003.1:
http://www.opengroup.org/onlinepubs/009695399/functions/writev.html

"The writev() function shall be equivalent to write(), except as 
described below."

None of the exceptions described state writev() should not operate in 
same atomic manner as write().

If other Unixes are not standards compliant in this regard, then I 
believe it would be correct to revert to the original behavoir.

-Paul Querna

Mime
View raw message