diff --git a/include/signal.h b/include/signal.h index 84ee27e8232..3215f04b1e6 100644 --- a/include/signal.h +++ b/include/signal.h @@ -390,7 +390,7 @@ struct sigaction } sa_u; sigset_t sa_mask; int sa_flags; - FAR void *sa_user; + FAR void *sa_user; /* Passed to siginfo.si_user (non-standard) */ }; /* Definitions that adjust the non-standard naming */ diff --git a/sched/signal/sig_dispatch.c b/sched/signal/sig_dispatch.c index 0d3c7b646d5..d910fb09044 100644 --- a/sched/signal/sig_dispatch.c +++ b/sched/signal/sig_dispatch.c @@ -101,6 +101,7 @@ static int nxsig_queue_action(FAR struct tcb_s *stcb, siginfo_t *info) } memcpy(&sigq->info, info, sizeof(siginfo_t)); + sigq->info.si_user = sigact->act.sa_user; /* Put it at the end of the pending signals list */ diff --git a/sched/signal/sig_queue.c b/sched/signal/sig_queue.c index 6b9651806c0..a611f63cc2b 100644 --- a/sched/signal/sig_queue.c +++ b/sched/signal/sig_queue.c @@ -101,6 +101,7 @@ int nxsig_queue(int pid, int signo, union sigval value) info.si_pid = rtcb->pid; info.si_status = OK; #endif + info.si_user = NULL; /* Will be set in sig_dispatch.c */ /* Send the signal */