sosend_generic fails a send on a socket that can send no more with EPIPE
before it looks at so_error. Winsock reports the same send as WSAECONNABORTED
or WSAECONNRESET, which reached the guest as ECONNABORTED or ECONNRESET.
A stream send now maps both to EPIPE. The send-after-close checks of
guest_tcp, guest_socket_read_write and guest_socket_pair run on Windows too.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
soreceive_generic returns 0 for a socket whose receive side is shut and for a
zero-length receive on a connected stream socket (ENOTCONN when it is not
connected), without waiting. Winsock fails the first with WSAESHUTDOWN, which
reached the guest as EPIPE, and blocks the second until data arrives. recv and
recvfrom now answer both themselves.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
On Linux sceKernelGetdirentries copied the host d_type, so a directory under app0 that is a host symlink was listed as a link, and a title that only descends into directory entries skipped it. Inside the app0 tree, report a symlink (or an entry of unknown type) as the type of its target; links elsewhere, and dangling links, stay links.
Follow FreeBSD 11.4 sys_setresuid and sys_setresgid (sys/kern/kern_prot.c):
accept real, effective, and saved user and group IDs for the guest process,
which is assumed to run as root with IDs 0. Setting an ID to 0 or -1 (unchanged)
is accepted without changing credentials and returns 0; any other value throws.
Cover both in guest_credentials test and update libkernel debt documentation.
On Windows a pair end now reports POLLIN after the peer's shutdown or close.
The console also reports POLLHUP after close; the loopback connection cannot
tell a close from a shutdown.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
WSAPoll reports POLLHUP alone for a stream socket whose peer has closed, so
poll never returned POLLIN for it and a caller waiting for POLLIN did not see
the end of the stream. sopoll_generic reports a socket that can receive no
more as readable and adds POLLHUP only once it can send no more either.
poll now adds the requested read bit and keeps POLLHUP only after the socket
shut its own sending side. A reset or refused connection keeps WSAPoll's flags.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
FreeBSD 11.4's sys_flock only requires a vnode descriptor, so flock on a directory descriptor succeeds. On Windows the call reached LockFileEx, which rejects a directory handle with ERROR_INVALID_PARAMETER, and flock_nid_postfix turned that into a runtime_error that aborted the process. A directory descriptor now returns 0 without taking a lock; the new guest_file_lock_directory case covers it and the debt entry records that no lock is held.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The call threw for lack of a signature. In the PS5 12.00 libkernel it takes
one int, passes it to syscall 601 (command 29) and returns the raw kernel
result. No dump is produced here, so it returns 0, as
sceCoredumpConfigDumpMode does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
Debt entries name the titles they were measured on. Use the title ID, or "a retail title" where the sentence needs no identification. No technical content changes.
The public SDK's libkernel, libkernel_sys and libkernel_web stub tables declare _sigintr, the
sigset_t that FreeBSD's libc shares between signal and siginterrupt, and no built library
provided it (#8846). libkernel now exports the 16-byte object, zero at start, and signal records
a handler with SA_RESTART unless its signal is in the set, as lib/libc/gen/signal.c does.
siginterrupt, which fills the set, is a libSceLibcInternal export; libc does not link libkernel
and cannot reach the dispositions, so it stays out and a debt entry for signal says so.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>