xiaoxiang781216 commented on code in PR #10857: URL: https://github.com/apache/nuttx/pull/10857#discussion_r1346245539
########## 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. Since nsh consume resource, it is good to exit after finishing the initialization for the memory. You can event launch it again with CONFIG_TTY_LAUNCH: https://github.com/apache/nuttx/blob/071fb18501a4198b21693bc089142039bb9dc1be/drivers/serial/serial.c#L1727-L1778 -- 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