__cxa_atexit

Name

__cxa_atexit -- register a function to be called by exit or when a shared library is unloaded

Synopsis

int __cxa_atexit(void (*func) (void *), void *arg, void *dso_handle);

Description

__cxa_atexit registers a function to be called by exit or when a shared library is unloaded.

The __cxa_atexit function is used to implement atexit, as described in ISO POSIX (2003). Calling
atexit(func)
from the statically linked part of an application shall be equivalent to
__cxa_atexit(func, NULL, NULL)
.

__cxa_atexit is not in the source standard; it is only in the binary standard. atexit is not in the binary standard; it is only in the source standard.