TRT
Sign in

Advanced · Module 6 · Lesson 5 of 10

Inter-Process Streams: Anonymous Pipes and Named FIFOs

Stream byte payloads between processes using anonymous pipes and named FIFOs, manage descriptor closure hygiene to signal EOF, and prevent SIGPIPE faults.

Pro — members onlyAbout 16 minutes

By the end you can

  • Create unidirectional byte channels between related processes using pipe
  • Enforce descriptor closure hygiene in parent and child to signal End-Of-File (EOF)
  • Handle SIGPIPE signals and EPIPE errors when writing to orphan streams
  • Create filesystem-backed named FIFOs with mkfifo for communication across unrelated processes

Builds on Signal Masks, Pending Signals, and Async-Signal Safety.

01 · A question first

Why does a child process reading from an anonymous pipe hang forever waiting for EOF even after the parent process finishes writing and exits? The secret lies in how the kernel tracks open write-end descriptor references.

Make a guess before you read on.

02 · The idea

Members only

Unlock the full lesson

This lesson is part of the membership. Join to read it in full, along with every other premium deep dive.

What's inside

  • Start with the problem
  • How the idea works
  • Why it is correct
  • What it costs
  • Pitfalls and variations
  • Where it is used

03 · Practice

Something wrong with this lesson? Report a problem