next up previous contents index
Next: 9.7.2 abort: terminate abnormally Up: 9.7 Termination Functions Previous: 9.7 Termination Functions

9.7.1 exit: terminate normally

     

DESCRIPTION

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.



University of Utah Flux Research Group