feat(libkernel): export sigtimedwait #3430
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3430"
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 reyani-dev on 2026-10-11T10:25:12Z.
What
Exports
sigtimedwait(D2-dIoJ0ZtE) from libkernel; it throwssigtimedwait: waiting for a pending signal not implemented.VLC (PPSA85300) imports it and fails to load without it. @babyhuey's run in #1578 shows it as VLC's next stop once the
rand48exports (#3424, merged) are in, so it is the stop on currentmain, on Linux with a catalog build (sce_module/libc.prxunwrapped as #2605 requires):Why a throw is enough for VLC. The relinker's registry for VLC's executable lists one call site for the import (
0x3DF955). The surrounding code (0x3DF8C0–0x3DF9CD) is VLC'svlc_write→vlc_writevfromsrc/posix/filesystem.c, instruction for instruction:sigaddset(&set, 13), thenpthread_sigmask(SIG_BLOCK, ...), thenwritev;errno == 32(EPIPE):while (sigtimedwait(&set, &info, &ts{0, 0}) >= 0 || errno != 35);;sigismember(&oset, 13)and the mask restore.So VLC reaches
sigtimedwaitonly after a write to a broken pipe or socket, to drain theSIGPIPE. AnyPS5 never leaves a guest signal pending:raisedelivers at once and does not consult the blocked mask, so there is nothing to wait for or take. A real implementation needs a pending-signal model, which doesn't exist yet; until then the call throws instead of guessing.guest_sigtimedwaitchecks the throw for a zero timeout, a one-second timeout and a null timeout.TechnicalDebt.mdrecords the call site, next to thedaemonentry for the same title.Tested
Windows 11 (10.0.26200), WinLibs GCC 15.2.0 r7, Release,
BUILD_TESTING=ON, onmain68ae2a89:guest_sigtimedwaitandguest_signalspass 3/3. Without the export,guest_sigtimedwaitdoesn't link.ctest -E "^agc_|video_out": 445/447.windows_exceptions(#3411) andguest_ampr_markersfail onmainhere too.check_conventions.pypasses. No open PR touchesSignals.cppor the new test, and inlibkernel/CMakeLists.txt, the only file shared with an open PR (#2054), the two merge without a conflict. I checked through the API, sincepr_overlap.pycurrently fails on #3418 (#3427).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T10:25:32Z.
Progress report (
99c1c26→2a2696b)📉 System libraries: 85.73% (-0.03%, +1 declared functions)
🆕 1 declared as stubs
sigtimedwait_nid_postfixImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T10:36:50Z.
Checked the build and
guest_sigtimedwait/guest_signalson Linux; the NIDD2-dIoJ0ZtEmatchessigtimedwait, the test is registered in ctest and the TechnicalDebt line is in place. Throwing is right while guest signals are never left pending; merging once CI is green.