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.
This commit is contained in:
parent
6e9e215943
commit
e935bc53bb
@ -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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user