#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);
}
atexit(), on_exit()