T29 Dec 19, 2025 2 min read

File descriptor

An OS handle (usually a small integer) representing an open file, socket, pipe, or similar I/O resource owned by a process.

Definition

A file descriptor is an OS-managed handle (often a small integer) that represents an open I/O resource owned by a process.

Despite the name, file descriptors aren’t just “files”. They commonly represent:

Why you care

Most systems cap how many file descriptors a process can have open at once. When that limit is hit, you see failures like “too many open files”, and network/file operations start breaking in surprising ways.