ATEXIT

Section: Linux Programmer's Manual (3)
Updated: March 29, 1993
Index Return to Main Contents
 

NAME

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

SYNOPSIS

#include <stdlib.h>

int atexit(void (*function )(void));
 

DESCRIPTION

The atexit() function registers the given function to be called at normal program termination, whether via exit(2) or via return from the program's main. Functions so registered are called in the reverse order of their registration; no arguments are passed.  

RETURN VALUE

The atexit() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error.  

ERRORS

ENOMEM
Insufficient memory available to add the function.
 

CONFORMING TO

SVID 3, BSD 4.3, ISO 9899  

SEE ALSO

exit(3), on_exit(3)


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
CONFORMING TO
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 12:23:14 GMT, March 22, 2025