apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject [PATCH] add APR_SENDFILE_AUTODETECT programming interface
Date Fri, 18 Mar 2005 18:54:22 GMT
Applications turn on this flag if they want to avoid any sendfile
bogosity, which can be triggered based on hardware or software or
configuration.

AFAIK, Solaris and z/OS are the only platforms that have no sendfile
concerns which the current APR code doesn't already handle, so for
non-{Solaris, z/OS}, sendfile will always return APR_ENOTIMPL when the
APR_SENDFILE_AUTODETECT flag is specified.

Enterprising platform gurus can decide whether or not it is practical
to address all of the platform nuances with sendfile, and if
appropriate modify their platform's sendfile interface.

Example use:

Apache 2.x uses the directive "EnableSendfile Autodetect" to turn on
this APR_SENDFILE_AUTODETECT flag.  The setting for EnableSendfile in
the default configuration file is Autodetect.  Apache will check for
the ENOTIMPL return code and handle as appropriate.

Alternate strategy: APR internally implements the sendfile interface
using other mechanisms, such that applications don't need to check for
APR_ENOTIMPL.

Mime
View raw message