pussuw commented on code in PR #10857:
URL: https://github.com/apache/nuttx/pull/10857#discussion_r1346186050


##########
sched/task/task_exithook.c:
##########
@@ -465,7 +465,15 @@ void nxtask_exithook(FAR struct tcb_s *tcb, int status)
    * status (no zombies here!)
    */
 
-  group_leave(tcb);
+  if (group_leave(tcb) == 0)
+    {
+      /* Group is dead now, PANIC() if this is the init task */
+
+      if (nxsched_is_inittask(tcb))

Review Comment:
   I was wondering about this use case but I'm not sure whether it works in 
kernel mode or not. At least in Linux the system panics at once if init is 
killed.



-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to