DaemonApp.exit

Exit cleanly from the application, passing the specified return code to the OS and optionally printing the specified message to the console.

Calling exit() will properly unwind the stack and all the destructors will be called. The method should be used only from the main application thread, though, as it throws an ExitException which may not be handled properly in other contexts.

  1. void exit(int status, istring msg)
  2. void exit(int status, istring msg, Logger logger)
    class DaemonApp

Parameters

status int

status code to return to the OS

msg istring

optional message to show just before exiting

Meta