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. */