AlgoMaster Logo

Zombies and Orphans

High Priority12 min readUpdated August 14, 2026

A child process can finish executing without disappearing immediately. Another child can continue executing even after the process that created it has disappeared.

These two situations produce two memorable Unix terms:

  • A zombie has terminated, but its parent has not yet collected its termination information.
  • An orphan is still alive when its parent terminates, so the operating system assigns it a new parent.

The names sound similar, but the underlying situations are almost opposites. A zombie is dead but still has a process-table record. An orphan is alive but has lost its original parent.

Understanding the distinction matters in real systems. A backend service that launches helpers without collecting them can slowly fill its process table with zombies. A container whose main process does not act as a proper parent can inherit descendants and fail to reap them.

This chapter explains two-stage process termination, how zombies are created and reaped, how orphans are reparented, and why subreapers and PID 1 matter in services and containers.

Premium Content

Subscribe to unlock full access to this content and more premium articles.