What is the difference between exit(), _exit() and _Exit() in C?
How do I decide which to use?
On bash, <
From man:
exit:
All functions registered with atexit(3) and on_exit(3) are called, in the reverse order of their registration ... All open stdio(3) streams are flushed and closed. Files created by tmpfile(3) are removed._exit:
The function _exit() is like exit(3), but does not call any functions registered with atexit(3) or on_exit(3). Whether it flushes standard I/O buffers and removes temporary files created with tmpfile(3) is implementation-dependent. On the other hand, _exit() does close open file descriptors ...