DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

atexit(S)


atexit -- add program termination routine

Synopsis

   include <stdlib.h>

int atexit(void (*func)(void));

Description

atexit adds the function func to a list of functions to be called without arguments on normal termination of the program. Normal termination occurs by either a call to the exit system call or a return from main. At least 32 functions may be registered by atexit; the functions will be called in the reverse order of their registration.

Return values

atexit returns 0 if the registration succeeds, nonzero if it fails.

Notices

If a signal is sent to a process that would have Exit or Core actions, the functions registered with atexit are not called. See signal(M).

References

exit(S)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005