Child ProcessのReapとは?
child processのreapとは、親がwait呼び出しを実行して終了した子のexit statusを取得し、それによりkernelがprocess tableから子のエントリを削除できるようにすることです。親がreapするまで、死んだ子はzombieとして残り続けます。init systemはorphanの子を自動的にreapします。
なぜ重要か
プロセスツリーを実行するがreapしないcontainerやrunnerは、増え続けるzombieの山を残します。これが、信頼できるreaperとして機能するための最小のinitプロセスが存在する理由です。
関連ガイド
What Is the Wait System Call?The wait system call lets a parent process pause until a child terminates and then read the child exit status…
What Is the Difference Between a Zombie and an Orphan?A zombie has finished but its exit status is uncollected, while an orphan is still running but has lost its p…
What Is an Init System?An init system is the first process the kernel starts; it boots and supervises other services and adopts orph…