libkernel: sceKernelFcntl is a stub while fcntl handles sockets; fix branch ready #3048
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-10T21:10:27Z.
sceKernelFcntl(libkernel, Open.cpp) is a stub that callsNotImplemented_nid_no_patch, while the POSIXfcntlexport already handles guest sockets (F_GETFL,F_SETFLwithO_NONBLOCK) in Udp.cpp. A title that reaches the SDK'ssceKernelFcntltherefore stops with the not-implemented error even for the socket casesfcntlsupports.Fix branch ready:
screamm:feat/libkernel-scekernelfcntl(f0c64970, one commit onmain56fb1b3b). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commit as is.sceKernelFcntl(int fd, int cmd, ...)delegates socket descriptors to thefcntlexport and returns its guest errno asSCE_KERNEL_ERROR_*, the form the othersceKernelfile exports use (sceKernelOpen,sceKernelMkdir). A closed or out-of-range descriptor returnsSCE_KERNEL_ERROR_EBADF.sceKernelFcntl: file descriptors are not implemented): their open flags are not tracked, soF_GETFL/F_SETFLcannot be answered truthfully. Recorded in TechnicalDebt together with the unsupportedF_DUPFD/F_GETFD/F_SETFD.guest_kernel_fcntlcovers the socket flag round trip,ENOTSUPfor an unsupported flag,EINVALfor an unknown command,EBADFfor closed, negative and never-opened descriptors, and the file-descriptor exception.Tested on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
BUILD_TESTING=ON, full build includinglibs:guest_kernel_fcntl3/3 (--repeat until-fail:3);ctest -j8 -E "^agc_|video_out"389/389;tools/check_conventions.py --base mainandgit diff --checkpass. Not run on Linux.Written with Claude Code assistance.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T01:08:46Z.
Fixed by #3078.