Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 75979 invoked by uid 500); 20 Oct 2002 17:46:01 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 75955 invoked from network); 20 Oct 2002 17:46:01 -0000 Date: Sun, 20 Oct 2002 10:46:05 -0700 From: Aaron Bannert To: APR Development List Subject: Re: [PATCH] Win32: Why explicitly futz with the file pointer? Message-ID: <20021020174604.GW4179@clove.org> Mail-Followup-To: Aaron Bannert , APR Development List References: <5.1.0.14.2.20021020094406.02d0dec8@pop3.rowe-clan.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Sun, Oct 20, 2002 at 11:30:35AM -0400, Jeff Trawick wrote: > Maybe APR_APPEND needs to be cheap/simple append a la stdio append: we > seek to the end of the file at open time and forget about it after > that. > > Then we need new APR_WRITE_AT_END or something better named which is > the expensive atomic append. For Unix, this enables O_APPEND on the > file and the kernel handles the details. For Win32, this enables > acquire-global-mutex + setfileptr + release-global-mutex prior to > every write. But then that has issues with non-related processes > sharing the mutex. I like the idea, but yeah, to have a global mutex on windows you have to give it a filename (so the non-related processes can rendezvous on the same mutex). -aaron