---
name: "exit"
section: "2"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/exit/2"
---

# exit(2)

terminate the calling thread

## 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)](/_exit/3.md), 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

[**exit\_group**(2)](/exit_group/2.md), [**\_exit**(3)](/_exit/3.md), [**exit**(3)](/exit/3.md), [**pthread\_exit**(3)](/pthread_exit/3.md)
