libkernel_sys: fpathconf on a kqueue or shm descriptor returns the UFS constants instead of EOPNOTSUPP #11291
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 oneandonlydean on 2026-10-26T00:25:10Z.
fpathconfon a descriptor with no vnode only special-cases FIFOs and sockets, so a kqueue and ashm_open(SHM_ANON, ...)descriptor still get the UFS constants. I haven't run this myself; the numbers are from wachi35676's runs on Windows and WSL2 in https://github.com/boykopovar/AnyPS5/pull/10427#issuecomment-6405135062.In those runs
_PC_LINK_MAX / _PC_NAME_MAX / _PC_PIPE_BUFreturn 32767 / 255 / 512 for both descriptor kinds. FreeBSD 11.4 returns -1 withEOPNOTSUPP(kern_fpathconf, kern_descrip.c:1411-1429): after_PC_ASYNC_IO, which is answered for every descriptor and is 200112 on both sides, only descriptors with a vnode, pipes and sockets are answered.The code is
_fpathconf_nid_postfixincore/libs/prx/libkernel_sys/Export.cpp. This isn't caused by #10427; that PR just made the gap visible. A guest test next to the existing socket cases would cover it.