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

  man pages->Linux man pages -> on_exit (3)              
Title
Content
Arch
Section
 

ON_EXIT(3)

Contents


NAME    [Toc]    [Back]

       on_exit	-  register a function to be called at normal program termination.

SYNOPSIS    [Toc]    [Back]

       #include <stdlib.h>

       int on_exit(void (*function)(int , void *), void *arg);

DESCRIPTION    [Toc]    [Back]

       The on_exit() function registers the given function  to	be  called  at
       normal  program termination, whether via exit(3) or via return from the
       program's main.	The function is passed the argument to exit(3) and the
       arg argument from on_exit().

RETURN VALUE    [Toc]    [Back]

       The on_exit() function returns the value 0 if successful; otherwise the
       value -1 is returned.

SEE ALSO    [Toc]    [Back]

      
      
       atexit(3), exit(3)



GNU				  1993-04-02			    ON_EXIT(3)
[ Back ]
 Similar pages
Name OS Title
atexit HP-UX register a function to be called at program termination
exit Linux cause normal program termination
exit OpenBSD perform normal program termination
_Exit OpenBSD perform normal program termination
_Exit FreeBSD perform normal program termination
exit FreeBSD perform normal program termination
exit NetBSD perform normal program termination
atexit OpenBSD register a function to be called on exit
atexit FreeBSD register a function to be called on exit
atexit NetBSD register a function to be called on exit
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service