Bug 38697 - tomcat native calls apr_socket_sendfile even when routine doesn't exist
Summary: tomcat native calls apr_socket_sendfile even when routine doesn't exist
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Native:Integration (show other bugs)
Version: Nightly Build
Hardware: Macintosh Mac OS X 10.4
: P2 critical (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-17 19:43 UTC by James Berry
Modified: 2006-02-17 10:54 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Berry 2006-02-17 19:43:43 UTC
The apr_socket_sendfile routine does not exist on all platforms. APR_HAS_SENDFILE is set to 0 in these 
cases. The tomcat native support does not respect this flag, and tries to call the sendfile routine anyway, 
resulting in a crash at runtime.

This occurs, for instance, on Mac OS X 10.4 Tiger, where the underlying sendfile routine is not 
implemented.

Perhaps there's a way to back away from using sendfile if the routine doesn't exist, while still allowing the 
rest of apr support?
Comment 1 Mladen Turk 2006-02-17 19:54:42 UTC
Fixed in the SVN.
See:
http://svn.apache.org/viewcvs?rev=378588&view=rev
and
http://svn.apache.org/viewcvs?rev=378586&view=rev

Thanks for spotting that.