On Sat, Feb 08, 2003 at 02:21:28AM +0100, Branko Äibej wrote: > Joe Orton wrote: > >It does indeed, is this the kind of fix you were thinking of? > > > I expect that change would avoid the problem, yes. (In fact, in > Subversion, I did an explicit fluxh befode calling apr_file_info_get, > for this very reason.) I was sort of hoping someone had a better idea > for a fix, though; forcing a flush before every stat seems to me to > defeat the whole purpose of buffering.
I'm confused by that - buffering means "some writes are deferred", so a direct consequence of that is that the st_size returned by a stat on the file may not equal the number of bytes passed to apr_file_write, right? If you want stat().st_size to always equal the number of bytes passed to apr_file_write, then it sounds like you don't want to use buffering? Regards, joe
