hartmannathan opened a new pull request #548:
URL: https://github.com/apache/incubator-nuttx-apps/pull/548


   ## Summary
   
   Prior to this change, the webserver program would _never_ terminate, even 
when running as a NSH built-in app.  For example:
   
   ```
   nsh> webserver &
   webserver [6:100]
   nsh> Starting webserver
   
   nsh> kill -9 6
   nsh> webserver_main: Still running
   nsh> webserver_main: Still running
   nsh> webserver_main: Still running
   nsh> webserver_main: Still running
   ```
   
   The message "Still running" would be printed forever, every 3 seconds. 
Despite printing "Still running," httpd has terminated and the process is doing 
nothing. This was done because webserver can be a standalone app which must 
never terminate.
   
   This PR preserves the above behavior when built as a standalone program that 
must never terminate, but makes it possible to terminate the app normally when 
built as a NSH built-in app:
   
   ```
   nsh> webserver &
   webserver [6:100]
   nsh> Starting webserver
   
   nsh> kill -9 6
   nsh> webserver_main: Exiting
   ```
   
   ## Impact
   
   Allows the expected outcome when 'kill -9' the webserver.
   
   ## Testing
   
   Ran on custom hardware.
   nxstyle.
   


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