on_exit(3) Library Functions Manual on_exit(3) on_exit - (libc -lc) #include int on_exit(typeof(void (int, void *)) *function, void *arg); glibc ( feature_test_macros(7)): on_exit(): glibc 2.19: _DEFAULT_SOURCE glibc 2.19 : _BSD_SOURCE || _SVID_SOURCE on_exit() function exit(3) main() . function exit(3) arg on_exit(). : . fork(2) . exec(3) . on_exit() 0 . attributes(7). +------------+------------------------------------+--------------------+ || | | +------------+------------------------------------+--------------------+ |on_exit() | | MT-Safe | +------------+------------------------------------+--------------------+ . SunOS 4 glibc. Solaris (SunOS 5). atexit(3) . function (auto) . arg . _exit(2), atexit(3), exit(3) 3 . . : . 6.18 8 2026 on_exit(3)