on_exit(3) Library Functions Manual on_exit(3) on_exit - C (libc, -lc) #include int on_exit(void (*function)(int, void *), 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 | +----------------------------+----------------------------------------------------------+--------------------------+ None. SunOS 4, glibc. Removed in Solaris (SunOS 5). Use the standard atexit(3) instead. CAVEATS function (auto) . arg ; . _exit(2), atexit(3), exit(3) () Azamat Hackimov , Konstantin Shvaykovskiy , Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.9.1 2 2024 . on_exit(3)