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


##########
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:
   Seems like calling exit() for nsh works just fine. There is a bug in my 
implementation here which causes the crash.
   
   Abandoning.



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