Don't actually send a signal with signo 0

As stated by standards.
This commit is contained in:
YAMAMOTO Takashi 2020-03-09 19:38:21 +09:00 committed by patacongo
parent 655fcf18d0
commit 674417bb33

View File

@ -310,6 +310,13 @@ int nxsig_tcbdispatch(FAR struct tcb_s *stcb, siginfo_t *info)
DEBUGASSERT(stcb != NULL && info != NULL); DEBUGASSERT(stcb != NULL && info != NULL);
/* Don't actually send a signal for signo 0. */
if (info->si_signo == 0)
{
return OK;
}
/************************** MASKED SIGNAL ACTIONS *************************/ /************************** MASKED SIGNAL ACTIONS *************************/
masked = (bool)sigismember(&stcb->sigprocmask, info->si_signo); masked = (bool)sigismember(&stcb->sigprocmask, info->si_signo);