_exit (with one underscore) is responsible for closing open files, calling functions registered by the standard function atexit, and, for C++, calling destructors for static class objects.
The standard exit function can be reimplemented by an application. This function is called either directly by the user, or when the application returns from main. In order to stop the processor and to perform the required cleanup, it is recommended that _exit is called.