xiaoxiang781216 commented on a change in pull request #1187:
URL: https://github.com/apache/incubator-nuttx/pull/1187#discussion_r437872559



##########
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:
       > why is this necessary?
   
   I think that It's dangerous to terminate the main thread but leave other 
threads in the task keep running. And other similar function also do the same 
thing(e.g. task_restart, nxsig_abnormal_termination, exit...).
   
   > why is this rtcb, not dtcb?
   
   good catch, I will fix it.




----------------------------------------------------------------
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]


Reply via email to