group/group_signal: cancel dispatch signal when the number

MIRTOS-647

of members in the group is zero.

Repetition step:
If using waitpid() to wait a task has exited, the waitpid will use
nxsing_kill with signal number 0 to determine if that task is still
alive, and will call group_signal to dispatch signal for each member
of the group and perform signal handing checks, it will assert at
sched/group/group_signal.c:261.

Change-Id: I75ef015a261101277436d742897ce68fed44b5da
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
(cherry picked from commit 73008471e4e4a5b1e3aa6cc0d25b5295aec32bb1)
This commit is contained in:
Jiuzhu Dong
2021-05-12 15:27:03 +08:00
committed by dongjiuzhu1
parent cc2966faa6
commit 3c58f96ddb
+6 -2
View File
@@ -245,11 +245,15 @@ int group_signal(FAR struct task_group_s *group, FAR siginfo_t *siginfo)
* signal to a pending state.
*/
else /* if (info.dtcb) */
else if (info.dtcb)
{
DEBUGASSERT(info.dtcb);
tcb = info.dtcb;
}
else
{
ret = -ECHILD;
goto errout;
}
/* Now deliver the signal to the selected group member */