Process Groupとは?
process groupは、共有のgroup IDで識別される1つ以上のプロセスの集まりで、OSがそれら全体へまとめてsignalを配送できるように作られます。shellは各コマンドのpipelineを独自のgroupに入れ、job全体を1つの単位として一時停止したりkillしたりできるようにします。すべてのgroupは、より大きなsessionに属します。
なぜ重要か
process groupへsignalを送ることは、CI runnerがあるコマンドとそれが起動したすべてのサブプロセスを終了させる手段です。これがないと、トップのプロセスだけをkillしても子プロセスが動き続けることがあります。
関連ガイド
What Is a Session Leader?A session leader is the process that creates a session, grouping process groups together and typically owning…
What Is Job Control?Job control is the shell feature that lets you start, suspend, resume, and move commands between the foregrou…
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…