_exit, which terminates the calling process in Unix, calls oskit_libc_exit with the exit status code. oskit_libc_exit is declared asvoid (*oskit_libc_exit)(int)
. It is initialized to a 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.