What is the difference between exit(), _exit() and _Exit() in C?
How do I decide which to use?
On bash, <
exit() terminating after cleanup.
_exit() terminating immediately after call.
If you have some stack corrupted while exit() function was called program may close with Segmentation Fault, if you are use _exit(), program exit in quick mode.
From http://msdn.microsoft.com/en-us/library/6wdz5232.aspx you have
exit() - Performs complete C library termination procedures, terminates the process, and exits with the supplied status code.
_exit() - Performs quick C library termination procedures, terminates the process, and exits with the supplied status code.
_cexit() - Performs complete C library termination procedures and returns to the caller, but does not terminate the process.
_c_exit() - Performs quick C library termination procedures and returns to the caller, but does not terminate the process.