Received: by taz.hyperreal.com (8.8.4/V2.0) id CAA10581; Wed, 12 Feb 1997 02:52:35 -0800 (PST) Received: from shado.jaguNET.com by taz.hyperreal.com (8.8.4/V2.0) with ESMTP id CAA10565; Wed, 12 Feb 1997 02:52:32 -0800 (PST) Received: (from jim@localhost) by shado.jaguNET.com (8.8.5/jag-2.4) id FAA29371 for new-httpd@hyperreal.com; Wed, 12 Feb 1997 05:52:26 -0500 (EST) From: Jim Jagielski Message-Id: <199702121052.FAA29371@shado.jaguNET.com> Subject: Re: [PATCH] lingering_close performance improvement To: new-httpd@hyperreal.com Date: Wed, 12 Feb 1997 05:52:26 -0500 (EST) In-Reply-To: from "David Robinson" at Feb 12, 97 09:42:08 am X-Mailer: ELM [version 2.4 PL25] Content-Type: text Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com 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!"