Page MenuHomeFreeBSD

linux sendfile: Fix handling of non-blocking sockets
ClosedPublic

Authored by markj on Tue, Nov 5, 1:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 17, 4:57 AM
Unknown Object (File)
Sat, Nov 16, 5:23 PM
Unknown Object (File)
Thu, Nov 14, 5:50 AM
Unknown Object (File)
Tue, Nov 12, 4:59 AM
Unknown Object (File)
Tue, Nov 12, 3:42 AM
Unknown Object (File)
Sun, Nov 10, 3:25 PM
Unknown Object (File)
Sun, Nov 10, 8:44 AM
Unknown Object (File)
Fri, Nov 8, 6:45 AM
Subscribers

Details

Summary

FreeBSD sendfile() may perform a partial transfer and return EAGAIN if
the socket is non-blocking. Linux sendfile expects no error in this
case, so squash EAGAIN.

PR: 282495

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Tue, Nov 5, 1:59 AM
sys/compat/linux/linux_socket.c
2596

This comes from commit 4f9fac78d4da6, but I don't really understand it: what exactly is triggering ENOBUFS?

Return EAGAIN if no bytes were sent

This revision was not accepted when it landed; it landed in state Needs Review.Wed, Nov 13, 2:16 PM
This revision was automatically updated to reflect the committed changes.