apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: [PATCH] Fix for Subversion issue #1789
Date Wed, 21 Feb 2007 16:04:05 GMT
On Mon, Feb 19, 2007 at 10:50:36AM -0600, Jonathan Gilbert wrote:
> At 09:33 AM 2/19/2007 +0000, Joe Orton wrote:
> >On Mon, Feb 19, 2007 at 12:30:00AM -0600, Jonathan Gilbert wrote:
> >> The obvious work-around is to take large writes and divide them up into
> >> smaller writes
> >
> >When not just constrain the length to 32K (doing so iff the file is a 
> >console output handle, if that's cheap to handle).
> >
> >  if (*nbytes > MAX_VALUE) *nbytes = MAX_VALUE;
> >
> >and just do a partial write; as you say, the API allows this.
> 
> This is the smallest possible change to achieve the basic functionality
> described, but it has two drawbacks:

Any caller using apr_file_write() and not checking for partial writes is 
broken and will break in cases less obscure than this, 
apr_file_write_full() has been in APR forever.

joe

Mime
View raw message