Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 16760 invoked by uid 6000); 7 Jun 1999 13:42:15 -0000 Received: (qmail 16718 invoked from network); 7 Jun 1999 13:42:01 -0000 Received: from silk.apana.org.au (root@202.12.87.81) by taz.hyperreal.org with SMTP; 7 Jun 1999 13:42:01 -0000 Received: from kheldar.apana.org.au (bjh@kheldar.apana.org.au [202.12.87.82]) by silk.apana.org.au (8.9.1/8.9.1) with SMTP id XAA20463 for ; Mon, 7 Jun 1999 23:41:35 +1000 Message-Id: <199906071341.XAA20463@silk.apana.org.au> From: "Brian Havard" To: "new-httpd@apache.org" Date: Mon, 07 Jun 1999 23:41:31 +1000 (EST) X-Mailer: PMMail 2.00.1500 for OS/2 Warp 4.00 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: cvs commit: apache-apr/apr/test testfile.c Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org On Mon, 7 Jun 1999 07:54:36 -0400 (EDT), Ryan Bloom wrote: >On 6 Jun 1999 bjh@hyperreal.org wrote: > >> - The directory entry for a file doesn't have it's size attribute updated until >> the file is closed or flushed. > >I don't like this. I would rather have the file flushed each time data is >written to it, than have to close the file to update the directory update. >I saw this same problem on Windows, and I just decided to flush the >buffer. IMHO, the OS is broken if it is buffering output to a file, but >not using that buffer at ALL time the file is referenced. It's not the file, just the directory information. The data written to a file is immediately available via other handles to the same file. >Do you have any strong objections to putting the test back the way it was, >and flushing the file with each write. I know it will cause a performance >hit, but it will make the results more predicatable. When is it so important for the directory entry to be up date before the file is closed? If the actual size is really needed it can be queried using the equivalent of an fstat on the open file's handle (DosQueryFileInfo). This will always return the true size and I've used it in the implementation of ap_getfileinfo(). -- ______________________________________________________________________________ | Brian Havard | "He is not the messiah! | | brianh@kheldar.apana.org.au | He's a very naughty boy!" - Life of Brian | ------------------------------------------------------------------------------