mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-27 00:28:14 +00:00
A handler that read the mask and put it back with SIG_SETMASK stored its own signal, which sigprocmask reports from the hold, in the process mask and cleared the hold, so the signal stayed blocked after the handler returned. pselect, setcontext and a siglongjmp inside the handler replace the mask the same way. When the handler's own thread releases a hold, the signal now gets back its bit from before the handler when the handler returns, as FreeBSD's sigreturn puts back the mask from before it. A mask another thread sets meanwhile is kept.