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
F167014009: D47447.id.diff
Tue, Aug 18, 2:29 PM
Unknown Object (File)
Sun, Aug 16, 4:25 PM
Unknown Object (File)
Fri, Aug 14, 8:01 PM
Unknown Object (File)
Wed, Aug 12, 7:35 PM
Unknown Object (File)
Wed, Aug 12, 6:41 AM
Unknown Object (File)
Wed, Aug 12, 6:39 AM
Unknown Object (File)
Wed, Aug 12, 12:07 AM
Unknown Object (File)
Sun, Aug 9, 3:31 PM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 60482
Build 57366: arc lint + arc unit

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.