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] apr_file_writev() on UNIX
Date Wed, 06 Oct 2004 18:46:53 GMT
On Wed, Oct 06, 2004 at 10:12:33AM -0600, Jean-Jacques Clar wrote:
> Lets agree there is a bug in the way the function is used in
> mod_disk_cache. That will be looked at.
>  
> As far as not having a bug in the !HAS_WRITEV implementation,
> I disagree.
> The current implementation does not have a single chance of
> being successful if there is more than 1 vector. This does
> not make sense to me. Let assume the write part is successful,
> the function will return apr_success but has completely failed
> to his task.

You're missing the point.  It is valid for apr_file_writev() to return
APR_SUCCESS and update *nbytes to less than the total number of bytes in
the vector.  The writev()-based implementation *may* do that.  The
non-writev-based implementation *will* do it, if passed a vector of more
than one buffer.  But the caller must cope with it either way.

joe

Mime
View raw message