A process terminates normally when the program calls
main is equivalent to calling
the value that
main returns is used as the argument to
exitfunction terminates the process with status status. This function does not return.
Normal termination causes the following actions:
on_exitfunctions are called in the reverse order of their registration. This mechanism allows your application to specify its own "cleanup" actions to be performed at program termination. Typically, this is used to do things like saving program state information in a file, or unlocking locks in shared data bases.
tmpfilefunction are removed; see section Temporary Files.
_exitis called, terminating the program. See section Termination Internals.
Go to the first, previous, next, last section, table of contents.