You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/03/09 13:56:18 UTC

[incubator-nuttx] branch master updated: Don't actually send a signal with signo 0

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 674417b  Don't actually send a signal with signo 0
674417b is described below

commit 674417bb3331e2f6bb8fbe569960da55645a20d0
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Mon Mar 9 19:38:21 2020 +0900

    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 1e9f531..013d144 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);