git: 122b2a3530f8 - main - getsockopt.2: Add SO_SPLICE source socket read and socket close behavior
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 26 Jul 2025 21:25:31 UTC
The branch main has been updated by kbowling:
URL: https://cgit.FreeBSD.org/src/commit/?id=122b2a3530f8baab56d196b51724cc3ddd38abd2
commit 122b2a3530f8baab56d196b51724cc3ddd38abd2
Author: Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2025-07-26 21:18:47 +0000
Commit: Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2025-07-26 21:18:47 +0000
getsockopt.2: Add SO_SPLICE source socket read and socket close behavior
Add select(2), poll(2), or kqueue(2) source socket semantics and close
behavior.
Reported by: Udip Pant <upant@netflix.com>
Reviewed by: manpages (ziaee), markj
Obtained from: OpenBSD
MFC after: 3 days
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D51547
---
lib/libsys/getsockopt.2 | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lib/libsys/getsockopt.2 b/lib/libsys/getsockopt.2
index 8839b61597a2..3867824681d7 100644
--- a/lib/libsys/getsockopt.2
+++ b/lib/libsys/getsockopt.2
@@ -593,6 +593,15 @@ specified amount of time has elapsed since the initial call to
If
.Fa sp_fd
is -1, the socket will be unspliced immediately.
+A successful
+.Xr select 2 ,
+.Xr poll 2 ,
+or
+.Xr kqueue 2
+operation testing the ability to read from the source socket indicates
+that the splicing has terminated and at least one byte is available for
+reading.
+When one of the sockets gets closed, splicing ends.
.Pp
When passed to
.Fn getsockopt ,