ZombieとOrphanの違いとは?
zombieプロセスはすでに終了しているが、親がまだexit statusを読んでいないためprocess tableに残り、何もせずスロットを占有します。一方orphanは、親が終了しinitへreparentされた、生きているプロセスです。この2つは正反対の状況を表します。終了したがreapされていない子と、動作中だが親のいないものです。
なぜ重要か
両者を区別すると後始末のバグを特定できます。zombieは親がreapしていないこと、orphanは親が先に死んだことを意味します。プロセスの監督が弱いと、どちらも忙しいrunner上で溜まりえます。
関連ガイド
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,…