This is an automated email from the ASF dual-hosted git repository. archer pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit e935bc53bb72f7333fb8570dc043bf2f8fd92b29 Author: Ville Juven <ville.ju...@unikie.com> AuthorDate: Wed Oct 25 15:42:05 2023 +0300 task/task_spawnparms.c: Set the new process's signal mask Set the newly spawned process's signal mask, if the caller has instructed to do so by setting POSIX_SPAWN_SETSIGMASK. This is called after the task has been created but has NOT been started yet. --- sched/task/task_spawnparms.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sched/task/task_spawnparms.c b/sched/task/task_spawnparms.c index 6db333cde3..cf231b78c9 100644 --- a/sched/task/task_spawnparms.c +++ b/sched/task/task_spawnparms.c @@ -149,6 +149,17 @@ int spawn_execattrs(pid_t pid, FAR const posix_spawnattr_t *attr) * return an error value, then we would also have to stop the task. */ + /* Firstly, set the signal mask if requested to do so */ + + if ((attr->flags & POSIX_SPAWN_SETSIGMASK) != 0) + { + FAR struct tcb_s *tcb = nxsched_get_tcb(pid); + if (tcb) + { + tcb->sigprocmask = attr->sigmask; + } + } + /* If we are only setting the priority, then call sched_setparm() * to set the priority of the of the new task. */