<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>We have a custom library shim that we are using to intercept libc calls 
from applications. We are loading this shim beneath nginx 1.2.3 using the 
LD_PRELOAD flag on both Linux and FreeBSD environments.</DIV>
<DIV> </DIV>
<DIV>After setting env LD_PRELOAD in the nginx.conf file, our shim is able to 
intercept a host of libc calls including read and write (as expected). On 
FreeBSD, sendfile is also intercepted from nginx as expected by our shim.</DIV>
<DIV> </DIV>
<DIV>On Linux however, our library is never reached when calling sendfile, even 
though we have verified that sendfile is being included from sys/sendfile.h 
(both through checking the bindings of the calls themselves using debugging 
tools and through tracing the code inside 
.../nginx-1.2.3/src/os/unix/ngx_linux_sendfile_chain.c).</DIV>
<DIV> </DIV>
<DIV>Calling sendfile through other applications results in a successful 
redirection to our library.</DIV>
<DIV> </DIV>
<DIV>I’m wondering if anyone has encountered difficulty with intercepting 
sendfile from nginx on Linux before, or if this is possibly an oversight on our 
part.</DIV>
<DIV> </DIV>
<DIV>Thanks in advance for any insight,</DIV>
<DIV>Ben</DIV></DIV></DIV></BODY></HTML>