From 122b2a3530f8baab56d196b51724cc3ddd38abd2 Mon Sep 17 00:00:00 2001 From: Kevin Bowling Date: Sat, 26 Jul 2025 14:18:47 -0700 Subject: [PATCH] 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 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 8839b61597a..3867824681d 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 ,