Complete Coverage
Code Examples
Interview Qs
Intermediate
About This Series
This series covers TLPI (The Linux Programming Interface) Chapter 44 โ Pipes and FIFOs โ in full detail. Every section and subsection is covered across 9 HTML files, each focused on one topic, with inline diagrams, multiple coding examples, and interview questions.
Pipes and FIFOs are foundational IPC (Inter-Process Communication) mechanisms used in every Linux system. From the shell’s | operator to client-server architectures, understanding pipes is essential for any systems programmer.
Topics Covered
All Files in This Series
The fundamentals โ what pipes are, how they work internally, and the pipe() system call.
How to use pipes between parent and child processes, including bidirectional communication and sibling communication.
Why closing unused pipe ends is mandatory, what SIGPIPE is, and how to handle broken pipes gracefully.
The Linux-specific pipe2() call with O_CLOEXEC and O_NONBLOCK flags, eliminating race conditions.
How to implement shell-style pipelines in C using dup2() and exec(), plus the convenient popen/pclose API.
Named pipes with filesystem entries, created with mkfifo(). Any two unrelated processes can communicate.
Complete rules for how open() behaves on FIFOs in blocking and nonblocking modes, plus EOF and re-open behaviour.
Building a multi-client server using FIFOs โ well-known server FIFO, per-client response FIFOs, and atomic writes.
Deep dive into pipe buffer sizes, PIPE_BUF atomic write guarantee, F_SETPIPE_SZ tuning, and safe partial-write handling.
Start Learning
Begin with File 1 and follow the series in order for the best learning experience.
Start: File 1 โ Pipe Introduction โ Jump to File 9 โ Advanced
