httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: [PATCH] lingering_close performance improvement
Date Wed, 12 Feb 1997 10:52:26 GMT
David Robinson wrote:
> 
> On Tue, 11 Feb 1997, Dean Gaudet wrote:
> 
> > You can open a single socketpair() before forking that all children use to
> > send to the parent.  If the buffer isn't full (heh) then a write() of a
> > "small size" is atomic. 
> > 
> > Anyone know if POSIX promises that behaviour?  We actually already rely on
> > it -- all our log code assumes that write() for a "small size" is atomic
> > (and that the OS implements O_APPEND atomically as well, and that the
> > underlying fs allows the atomicity to work... i.e. not NFS). 
> 
> Yes...
> When writing to a pipe or FIFO (N.B. _not_ a socket), write requests of 
> PIPE_BUF or less are guaranteed to be atomic; i.e. will not be interleved 
> with data from other processes doing writes on the same pipe. PIPE_BUF is 
> usually defined in limits.h; the Solaris 2.5.1 file has PIPE_BUF of 5120 
> and implies that the Posix required minimum value is 512.
> 

Hmmmm wonder if I can consider this the "double checking" mentioned
in my previous Email :)

-- 
====================================================================
      Jim Jagielski            |       jaguNET Access Services
     jim@jaguNET.com           |       http://www.jaguNET.com/
                  "Not the Craw... the CRAW!"

Mime
View raw message