Page MenuHomeFreeBSD

linux sendfile: Fix handling of non-blocking sockets
ClosedPublic

Authored by markj on Nov 5 2024, 1:59 AM.
Tags
None
Referenced Files
F151177117: D47447.id146031.diff
Mon, Apr 6, 3:03 PM
Unknown Object (File)
Mon, Apr 6, 7:36 AM
Unknown Object (File)
Mon, Apr 6, 6:23 AM
Unknown Object (File)
Sun, Apr 5, 9:12 PM
Unknown Object (File)
Sat, Apr 4, 10:51 PM
Unknown Object (File)
Mon, Mar 30, 1:46 PM
Unknown Object (File)
Mon, Mar 30, 7:22 AM
Unknown Object (File)
Mon, Mar 30, 12: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.Nov 5 2024, 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.Nov 13 2024, 2:16 PM
This revision was automatically updated to reflect the committed changes.