pussuw commented on code in PR #8740:
URL: https://github.com/apache/nuttx/pull/8740#discussion_r1126810163
##########
sched/signal/sig_dispatch.c:
##########
@@ -373,11 +373,11 @@ int nxsig_tcbdispatch(FAR struct tcb_s *stcb, siginfo_t
*info)
#endif
{
#ifdef CONFIG_LIB_SYSCALL
- /* If the thread is in syscall, schedule the sigaction here */
+ /* If the thread is in syscall, queue the sigaction here */
- if ((stcb->flags & TCB_FLAG_SYSCALL) != 0)
+ if (masked == 0)
Review Comment:
Very good question. I frankly do not have a 100% clear picture how this is
supposed to work. So you suggest that:
- The waiting task is woken up, possibly causing a context switch
When the signaling task is scheduled back:
- The signal action is queued after waking up the waiting task, if the
signal is not masked
- The signal is pended, if the signal is masked
?
Btw; the original logic was modified here:
https://github.com/apache/nuttx/pull/2851
As a regression, kill() / SIGKILL / SIGTERM no longer works if the
task/process is inside a system call AND waiting for a signal (sigwait, sleep,
etc). As the task is not waiting for SIGKILL/SIGTERM, it was put into the
pending queue (else-branch) and the task was correctly terminated. This is what
I noticed and am trying to fix.
--
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]