The atexit() function registers the given function to be called at normal process termination, either via exit(3) or via return from the program's main(). ###>The atexit() function registers the given function to be called at normal process termination, either via exit(3) or via return from the program's main().