Search code examples
c++abort

how to abort a c++ program and exit with status 0?


I want to kill my c++ program and terminate immediately without activating destructors of any kind, especially static and global variables, but I want to exit with status 0 - abort() will not work for me.

Does anyone have a solution? Thanks


Solution

  • Maybe _exit(0); is what you're looking for?

    Here is the man page to read up about it.