[PR PATCH] [Closed]: Fix FreeBSD/Darwin & Linux sendfile.

github at samba.org github at samba.org
Tue Feb 12 09:23:41 UTC 2019

There's a closed pull request on the Samba Samba Github repository

    Fix FreeBSD/Darwin & Linux sendfile.
Description:     Use poll() to emulate a blocking sendfile().

    This avoids spinning on EAGAIN/EWOULDBLOCK under Linux implementation,
    which greatly reduces CPU usage.


    This fixes FreeBSD/Darwin implementation, which under most cases did
    not work, it would break early when nwritten == 0.  Which would happen
    anytime it spun on EAGAIN writing 0 bytes.


More information about the samba-technical mailing list