exit(3) Library Functions Manual exit(3) exit - (libc -lc) #include [[noreturn]] void exit(int status); exit() status ( status & 0xFF) ( wait(2)). atexit(3) on_exit(3) . ( atexit(3) on_exit(3) .) ( _exit(2) ) ( stdio(3)). atexit(3) on_exit(3) . stdio(3) . tmpfile(3). C EXIT_SUCCESS EXIT_FAILURE exit() . exit() . attributes(7). +-----------+------------------------------------+---------------------+ || | | +-----------+------------------------------------+---------------------+ |exit() | | MT-Unsafe race:exit | +-----------+------------------------------------+---------------------+ exit() . C11, POSIX.1-2008. C89, POSIX.1-2001, SVr4, 4.3BSD. atexit(3) on_exit(3) exit() longjmp(3). execve(2) atexit(3) on_exit(3). EXIT_SUCCESS EXIT_FAILURE ( UNIX) 0 1 -1. VMS . BSD ( C GNU C ) . exit() . : o SA_NOCLDWAIT SIGCHLD SIG_IGN . o . o "": ( ) . waitpid(2) ( ) . SIGCHLD . SA_NOCLDWAIT SIGCHLD . SIGHUP . SIGHUP SIGCONT . setpgid(2) . . prctl(2) PR_SET_PDEATHSIG . _exit(2), get_robust_list(2), setpgid(2), wait(2), atexit(3), on_exit(3), tmpfile(3) 3 . . : . 6.18 8 2026 exit(3)