xiaoxiang781216 commented on a change in pull request #1187:
URL: https://github.com/apache/incubator-nuttx/pull/1187#discussion_r438239737
##########
File path: sched/task/task_delete.c
##########
@@ -143,6 +144,15 @@ int task_delete(pid_t pid)
goto errout;
}
+#ifdef HAVE_GROUP_MEMBERS
+ /* Kill all of the children of the task. This will not kill the currently
+ * running task/pthread (this_task). It will kill the main thread of the
+ * task group if this_task is a pthread.
+ */
+
+ group_kill_children(rtcb);
Review comment:
Most people call task_delete mean to kill the whole task/process, just
like you kill the process from task manager windows on Linux/Windows, but now
this function just delete the main thread but let other threads in the same
task keep running. And worse you can't kill other threads in this task by
task_delete, then we don't have any API to terminate all threads in a task.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]