## _exit

#### OS/161 Reference Manual

### Name

_exit - terminate process

### Library

Standard C Library (libc, -lc)

### Synopsis

`#include <unistd.h>`
`void`
`_exit(int` exitcode`);`

### Description

Cause the current process to exit. The exit code exitcode is reported back to other process(es) via the waitpid() call. The process id of the exiting process should not be reused until all processes expected to collect the exit code with waitpid have done so.

Traditionally exit codes are only seven bits wide (values 0-127); values outside this range were truncated. Portable code should not rely on being able to use exit codes outside this range. The definitions in OS/161 support a much wider range.

### Return Values

`_exit` does not return.