libkernel: synchronous signal waits (pause, sigsuspend, sigwait) throw unconditionally #4561
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 jagrat04 on 2026-10-12T15:39:55Z.
Summary
In
libkernel(core/libs/prx/libkernel/System/src/Signals.cpp), all synchronous signal waiting calls currently throwNotImplemented_nid_no_patch:pause()sigsuspend()(#3253)sigwait()sigwaitinfo()sigtimedwait()Context
While asynchronous signal handlers via
sigactionand thread masking viapthread_sigmask/_sigprocmaskare modeled, signals raised while blocked are not held in a pending signal queue. Consequently:sigpendingzeroes the pending mask (as no pending signals queue is maintained).pause,sigsuspend,sigwait) throwNotImplemented_nid_no_patch, ending the process.POSIX-oriented homebrew and ports (e.g. VLC, RetroArch, PS5MC) that rely on signal-based synchronization cannot wait on signal delivery.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by VitzS7 on 2026-10-12T21:30:48Z.
Status update, since this issue predates the merge:
pause,sigwait,sigwaitinfoandsigtimedwaitno longer throw. #4138 landed onmainand all four wait on the pending set: a signal raised while blocked stays pending and is taken bysigwait,sigwaitinfoorsigtimedwait, delivered to the handler when_sigprocmaskunblocks it, or consumed bypause.sigtimedwaitreturns the number,EAGAINon a zero timeout, and blocks on a null timeout; the set covers signals 1 to 128 and the lowest pending number wins.Still open from the list:
sigsuspend, which is #4383.One thing that has not changed: the pending set is process-wide, not per thread. #3986 replaces the process-wide mask with a per-thread one, and the pending set has to follow it (a signal raised while blocked on one thread belongs to that thread); that work is only worth doing on top of #3986.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-13T02:08:18Z.
Closing: #4138 implements
pause,sigwait,sigwaitinfoandsigtimedwaiton a pending set.sigsuspendis the one left; it is tracked in #3253 (PR #4383).