*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> atexit (3c)              
Title
Content
Arch
Section
 

Contents


atexit(3C)							    atexit(3C)


NAME    [Toc]    [Back]

     atexit, __ateachexit - add	program	termination routine

SYNOPSIS    [Toc]    [Back]

     #include <stdlib.h>

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

     int __ateachexit (void (*func)(void));

DESCRIPTION    [Toc]    [Back]

     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	most 32	functions may be registered by atexit; the functions will be
     called in the reverse order of their registration.

     For sproc processes, atexit is only called	when the last member of	the
     share group exits,	regardless of whether the share	group creator has
     returned from main.

     __ateachexit adds the function func to a list of functions	to be called
     without arguments on termination of any member of a share group.  Note
     that the last share group member will call	functions registered with
     __ateachexit and atexit.

     atexit and	__ateachexit return 0 if the registration succeeds, nonzero if
     it	fails.

SEE ALSO    [Toc]    [Back]

      
      
     exit(2), sproc(2).


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
abort NetBSD cause abnormal program termination
abort Linux cause abnormal program termination
exit Linux cause normal program termination
abort FreeBSD cause abnormal program termination
abort OpenBSD cause abnormal program termination
_Exit FreeBSD perform normal program termination
exit FreeBSD perform normal program termination
_Exit OpenBSD perform normal program termination
exit NetBSD perform normal program termination
exit OpenBSD perform normal program termination
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service