Search notes:

libc: exit

#include <stdlib.h>

int main() {

 //
 // Don't confuse the program's exit status with a
 // process' termination status (but in the case
 // when exit is used, the exit status becomes the
 // process' termination status).
 //
    exit(42);

}
Github repository about-libc, path: /exit/exit.c

TODO

atexit(), on_exit()

See also

The Standard C Library

Index