mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 08:33:12 -05:00
Before: raise, kill and pthread_kill delivered a signal at once or failed with EINVAL, nothing stayed pending, and pause, sigwait, sigwaitinfo and sigtimedwait called NotImplemented_nid_no_patch. Now: a process-wide pending set holds signals 1 to 128. A signal raised while it is blocked stays pending and is delivered when _sigprocmask unblocks it, taken by sigwait, sigwaitinfo or sigtimedwait, or delivered by pause, which runs its handler on the calling thread and returns -1 with EINTR. pthread_kill to another thread leaves the signal pending for whichever thread waits for it and answers ESRCH for a handle that is not a live guest thread. sigtimedwait follows FreeBSD's sigtimedwait(2): EAGAIN on timeout, EINVAL for a tv_nsec outside 0 to 1000000000 while nothing is pending, and an indefinite wait with a null timeout.