table of contents
other languages
other sections
| exit(2) | System Calls Manual | exit(2) |
NAME¶
exit - terminate the calling thread
LIBRARY¶
Standard C library (libc, -lc)
SYNOPSIS¶
#include <sys/syscall.h> /* Definition of SYS_* constants */ #include <unistd.h>
[[noreturn]] long syscall(SYS_exit, int status);
DESCRIPTION¶
exit() terminates the calling thread.
By contrast with _exit(3), the exit() system call terminates only the calling thread, and actions such as reparenting child processes or sending SIGCHLD to the parent process are performed only if this is the last thread in the thread group.
RETURN VALUE¶
exit() does not return.
STANDARDS¶
Linux.
HISTORY¶
Linux.
SEE ALSO¶
| 2026-06-05 | Linux man-pages 6.19 |