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

  man pages->HP-UX 11i man pages -> atexit (3)              
Title
Content
Arch
Section
 

Contents


 atexit(3)                                                         atexit(3)




 NAME    [Toc]    [Back]
      atexit - register a function to be called at program termination

 SYNOPSIS    [Toc]    [Back]
      #include <stdlib.h>

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

 DESCRIPTION    [Toc]    [Back]
      atexit() registers the function func to be called, without arguments,
      at normal program termination.  Functions registered by atexit() are
      called in reverse order of registration.

      An atexit() call during exit processing is always unsuccessful.

      The number of registered functions should not exceed ATEXIT_MAX as
      specified in <limits.h>.

      When necessary, crt0() or dld.sl() (see crt0(3) and dld.sl(5))
      registers one or more functions with atexit() to allow some processing
      at normal program termination.  This registration occurs before any
      other.

 RETURN VALUE    [Toc]    [Back]
      atexit() returns zero if the registration is successful; non-zero if
      unsuccessful.

 SEE ALSO    [Toc]    [Back]
      exit(2), crt0(3), dld.sl(5).

 STANDARDS CONFORMANCE    [Toc]    [Back]
      atexit(): AES, SVID3, XPG4, ANSI C


 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003
[ Back ]
      
      
 Similar pages
Name OS Title
on_exit Linux register a function to be called at normal program termination.
atexit Linux register a function to be called at normal program termination.
atexit OpenBSD register a function to be called on exit
atexit NetBSD register a function to be called on exit
atexit FreeBSD register a function to be called on exit
abort OpenBSD cause abnormal program termination
exit Linux cause normal program termination
abort Linux cause abnormal program termination
abort NetBSD cause abnormal program termination
abort FreeBSD cause abnormal program termination
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service