[EMAIL PROTECTED] wrote:
> 
> trawick     01/07/25 13:59:29
> 
>   Modified:    network_io/unix sendrecv.c
>   Log:
>   fix some issues with apr_sendfile() for FreeBSD
> 
>   1) checking when to call wait_for_io_or_timeout()
>      it checked errno without checking rv
>      it required that we already sent bytes (nbytes != 0)
>      it checked timeout != 0 instead of timeout > 0
>   2) it didn't retry the sendfile() (or writev()) after
>      a successful wait_for_io_or_timeout()

I'm going to use a slightly modified version of this on daedalus.  I'm
changing the EINTR loop to also loop on EAGAIN, with the
wait_for_io_or_timeout call inside the loop, protected by your new "if"
logic.  The point is to keep the object code more compact, so hopefully
it will use less i-cache for the normal case.  It's also less code for
us humans to stare at & maintain.

and of course I will run a trap for rv == 0 && 0 bytes sent.

Greg

Reply via email to