exit(2) System Calls Manual exit(2)

exit - terminate the calling thread

Standard C library (libc-lc)

#include <sys/syscall.h>  /* Definition of SYS_* constants */
#include <unistd.h>
[[noreturn]] long syscall(SYS_exit, int status);

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.

exit() does not return.

Linux.

Linux.

exit_group(2), _exit(3), exit(3), pthread_exit(3)

2026-06-05 Linux man-pages 6.19