From beb2af83783e8f6136f45c9abb3c17f3f9ddce66 Mon Sep 17 00:00:00 2001 From: chao an Date: Thu, 7 Mar 2024 18:59:56 +0800 Subject: [PATCH] sched/group: skip child wait if here is only self in member list Skip the child wait if here is only self in member list, since the members of the task group should be 1 if task exit. Fix Regression issue that the task could not terminate normally. Signed-off-by: chao an --- sched/group/group_killchildren.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sched/group/group_killchildren.c b/sched/group/group_killchildren.c index 7807af43ec1..514673ee97f 100644 --- a/sched/group/group_killchildren.c +++ b/sched/group/group_killchildren.c @@ -191,7 +191,8 @@ int group_kill_children(FAR struct tcb_s *tcb) ret = CONFIG_GROUP_KILL_CHILDREN_TIMEOUT_MS; while (1) { - if (sq_empty(&tcb->group->tg_members)) + if (sq_empty(&tcb->group->tg_members) || + sq_is_singular(&tcb->group->tg_members)) { break; }