mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-30 12:25:49 +00:00
FreeBSD 11 sendfile checks the file descriptor first, then looks up the socket with getsock_cap, which answers ENOTSOCK for an open descriptor that is not a socket and EBADF for one that is not open (sys/kern/kern_sendfile.c, sys/kern/uipc_syscalls.c). sendfile replaced the errno that Lookup had already set with EBADF. It now reports the errno Lookup chose, so an open non-socket gives ENOTSOCK and a closed descriptor still gives EBADF. The sentence about this gap is cut from the sendfile debt entry and guest_sendfile covers both cases.