patacongo opened a new issue, #9978:
URL: https://github.com/apache/nuttx/issues/9978
For sigprocmask(), the sigprocmaks mask in the TCB and is modified in
nxsig_procmask(). This is like:
121 case SIG_BLOCK:
122 sigorset(&rtcb->sigprocmask, &rtcb->sigprocmask, set);
123 break;
124
129 case SIG_UNBLOCK:
130 nxsig_nandset(&rtcb->sigprocmask, &rtcb->sigprocmask,
set);
131 break;
132
135 case SIG_SETMASK:
136 rtcb->sigprocmask = *set;
137
This seems wrong to me, however. The sigprocmask is a global mask, not a
per-thread mask! When the sigprocmask is set, shouldn't signals sent to the
entire task group be blocked? Not just for a single thread. This needs some
thought.
The primary purpose of the per-thread sigprocmask is controlling which
threads can receive which signals. Disabling a signal in the sigprocmask
For pthread_sigprocmask(), the sigprocmask is also currently set in
nxsig_procmask(). This is correct, but means that pthread_sigprocmask() and
sigprocmask() are identical. That can't be right.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]