From 674417bb3331e2f6bb8fbe569960da55645a20d0 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Mon, 9 Mar 2020 19:38:21 +0900 Subject: [PATCH] Don't actually send a signal with signo 0 As stated by standards. --- sched/signal/sig_dispatch.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sched/signal/sig_dispatch.c b/sched/signal/sig_dispatch.c index 1e9f53107d..013d1440c8 100644 --- a/sched/signal/sig_dispatch.c +++ b/sched/signal/sig_dispatch.c @@ -310,6 +310,13 @@ int nxsig_tcbdispatch(FAR struct tcb_s *stcb, siginfo_t *info) 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 = (bool)sigismember(&stcb->sigprocmask, info->si_signo);