src/projects/libc/stdlib/atexit.c
int atexit(void (*func)(void)) {
    if (atexit_handler_count == ATEXIT_HANDLER_COUNT_LIMIT) {
        return 1;
    }

    atexit_handlers[atexit_handler_count++] = func;
    return 0;
}
/*
 * Set function to be executed on exit.
 *
 * The function pointed by func is automatically called without arguments when the program terminates normally. If more
 * than one atexit function has been specified by different calls to this function, they are all executed in reverse
 * order as a stack (i.e. the last function specified is the first to be executed at exit). A single function can be
 * registered to be executed at exit more than once.
 *
 * I maximum of 32 handlers may be registered. If this function is called when this number of handlers is already
 * registered, it will do nothing and return a non-zero value. If the handler is successfully registered, the function
 * will return zero.
 */
Set function to be executed on exit.
The function pointed by func is automatically called without arguments when the program terminates normally. If more
than one atexit function has been specified by different calls to this function, they are all executed in reverse
order as a stack . A single function can be
registered to be executed at exit more than once.

I maximum of 32 handlers may be registered. If this function is called when this number of handlers is already
registered, it will do nothing and return a non-zero value. If the handler is successfully registered, the function
will return zero.
Set function to be executed on exit . The function pointed by func is automatically called without arguments when the program terminates normally . If more than one atexit function has been specified by different calls to this function they are all executed in reverse order as a stack . A single function can be registered to be executed at exit more than once . I maximum of 32 handlers may be registered . If this function is called when this number of handlers is already registered it will do nothing and return a non - zero value . If the handler is successfully registered the function will return zero .
int atexit(void (*func)(void)) {
    if (atexit_handler_count == ATEXIT_HANDLER_COUNT_LIMIT) {
        return 1;
    }
    atexit_handlers[atexit_handler_count++] = func;
    return 0;
}
int atexit ( void ( * func ) ( void ) ) { if ( atexit_handler_count == ATEXIT_HANDLER_COUNT_LIMIT ) { return 1 ; } atexit_handlers [ atexit_handler_count ++ ] = func ; return 0 ; }
Set function to be executed on exit.
Set function to be executed on exit .