summaryrefslogtreecommitdiff
path: root/nuttx/sched/sig_action.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/sched/sig_action.c')
-rw-r--r--nuttx/sched/sig_action.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/nuttx/sched/sig_action.c b/nuttx/sched/sig_action.c
index 14388c3d5..7f9a1c343 100644
--- a/nuttx/sched/sig_action.c
+++ b/nuttx/sched/sig_action.c
@@ -48,6 +48,11 @@
* Definitions
************************************************************/
+#define COPY_SIGACTION(t,f) \
+ { (t)->sa_sigaction = (f)->sa_sigaction; \
+ (t)->sa_mask = (f)->sa_mask; \
+ (t)->sa_flags = (f)->sa_flags; }
+
/************************************************************
* Private Type Declarations
************************************************************/
@@ -190,7 +195,7 @@ int sigaction(int signo, const struct sigaction *act,
{
if (sigact)
{
- *oact = sigact->act;
+ COPY_SIGACTION(oact, &sigact->act);
}
else
{
@@ -236,7 +241,7 @@ int sigaction(int signo, const struct sigaction *act,
if (act->sa_u._sa_handler)
{
- sigact->act = *act;
+ COPY_SIGACTION(&sigact->act, act);
}
/* No.. It is a request to remove the old handler */