apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: sendfile in darwin
Date Fri, 09 May 2008 14:29:09 GMT
FWIW, the current impl of sendfile() in Darwin (as coded in  
at least) internally uses writev() (but with real error checking :) ) to
send headers and footers, so breaking them out in APR really isn't
that bad :)


         if (uap->nbytes != USER_ADDR_NULL) {
                 /* XXX this appears bogus for some early failure  
conditions */
                 copyout(&sbytes, uap->nbytes, sizeof (off_t));

and the early failures seem mostly due to the writev() usage,
so it actually looks like NOT using sendfile() to send header/footer
makes some sense and doing it as we are now is best. It also
seems like the impl I "just" added to trunk seems to be something
to consider for 1.3 anyway, since we would have error handling/checking
on par with Linux and better (IMO) that what we have with the other
flavors. I'm really tempted to push r654788 for apr-1.3 as well
as a template for the other 'use-writev()' impls...

View raw message