What Is the Difference Between a Zombie and an Orphan?
A zombie process has already terminated but remains in the process table because its parent has not yet read its exit status, so it occupies a slot while doing nothing. An orphan, by contrast, is a live process whose parent has exited and which has been reparented to init. The two describe opposite situations: a finished but unreaped child versus a running but parentless one.
Why it matters
Distinguishing the two pinpoints cleanup bugs: zombies mean a parent is not reaping, while orphans mean a parent died first. Both can accumulate on a busy runner if process supervision is weak.
Related guides
What Is an Orphan Process?An orphan process is one whose parent has exited; it keeps running and is adopted by the init system, which b…
What Is Reaping a Child Process?Reaping is when a parent calls a wait operation to read a finished child exit status, freeing the kernel slot…
What Is SIGCHLD?SIGCHLD is the signal the kernel sends a parent process when one of its child processes stops or terminates,…