xiaoxiang781216 commented on pull request #367:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/367#issuecomment-675562777


   > I'm not that familiar with this part of NuttX but I couldn't find anything 
that caught my attention.
   > 
   > I'm curious, how do you manage nsh to exit? I'm assuming nsh starts some 
other task via init script, which
   > you fork, otherwise it this child task would also exit once nsh exits.
   
   Yes, we have many services which is started by init.d/rcS run on the 
background.
   
   > In that case, wouldn't be simpler to just add an "exit" at the end? Also, 
it is typical to end this kind of scripts with an exec()
   > call so that the calling process (nsh) is replaced by your second task. 
Not sure if that works in NuttX though.
   > 
   
   Yes, adding 'exit' at the end of init.d/rcS should work, but we want to 
control the behaviour through defconfig since developers are more familiar to 
modify defconfig than init.d/rcS. And this also make nsh align with sh's 
behaviour.
   
   > Anyway, this PR is more general than that, so I agree with the change and 
aligns with your previous PR.
   
   


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