Init Systemとは?
init systemは、kernelが起動する最初のuserspaceプロセスで、process IDが1として動作し、他のすべてのプロセスの祖先です。システムサービスを起動・監督し、shutdownを処理し、orphanプロセスを引き取ってreapできるようにします。containerでは、軽量なinitが、そのcontainer内のプロセスツリーに対してしばしばこの役割を担います。
なぜ重要か
適切なinitなしでcontainerやrunnerを動かすと、orphanプロセスは決してreapされず、signalが伝播しないことがあります。最小のinitを追加すると、CIのcontainerでのzombieの蓄積やクリーンなshutdownが解決します。
関連ガイド
What Is a Systemd Unit?A systemd unit is a configuration file describing a resource systemd manages, such as a service, socket, moun…
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 an Orphan Process?An orphan process is one whose parent has exited; it keeps running and is adopted by the init system, which b…