Bojan Smojver wrote:
> On Fri, 2007-05-11 at 15:58 +0100, Joe Orton wrote:
> 
>> Yes, that looks necessary.
> 
> Thanks, cool. Will implement. Honestly, even apr_file_flush() looks a
> bit suspect to me.
> 

I've just posted a few initial patches to bugzilla, PR 42400. (passes
testfile)

The patches improves the locking interaction with buffering. But, quite
frankly, the unix file_io locking and buffering is a bit messed. There
is no clear indication which functions are protected by APR_XTHREAD,
checks for partial writes on flushing are missing, buffering and file
positioning don't play well together, et cetera.

I am in the middle of writing a patch that converts all file_io to
standard i/o functions (stdio/streams) so we can remove all code
involving buffering, file positioning and even locking at some cases. It
saves a huge amount of code lines, and I hope, gives fewer bugs.

Comments?

--
Davi Arnaut

Reply via email to