IT lexicon › Programming › Pipe

Pipe

Programming På svenska → Updated: 2026-07-31

A one-way byte stream between two processes — what makes | in the shell possible.

The kernel sets up a buffer, gives one process a file descriptor to write into and the other one to read from. The writer blocks when the buffer is full, the reader when it is empty, which provides flow control for free. The buffer is typically 64 kB on Linux.

This is the mechanism the Unix philosophy rests on: small programs that do one thing, connected by text streams. A named pipe, created with mkfifo, lives in the filesystem and lets unrelated processes connect. A recurring phenomenon is SIGPIPE — writing to a pipe whose reader has gone kills the process by default, which is why head silences commands producing more output.

← Back to the lexicon