exit calls up to 32 functions installed via atexit in reverse order of installation before it calls _exit_exit, which terminates the calling process in Unix, calls oskit_libc_exit with the exit status code. oskit_libc_exit is declared as
void (*oskit_libc_exit)(int)
. It is initialized to function which loops infinitely. Other OSKit libraries and user libraries can set this function pointer at will accordingly.That OSKit kernel library will initialize this function pointer with a function that performs necessary cleanup and reboots the machine; if you set oskit_libc_exit, be sure to save and invoke that function if that behavior is desired.