環境ブロックとは?
環境ブロックとは、検索パスやロケールなど、プロセスに関連付けられた名前付き変数の集まりで、プログラムの実行中に利用できます。プロセスが子プロセスを起動すると、子プロセスは環境のコピーを受け取るため、子プロセスでの変更は親プロセスに影響しません。プログラムはこれらの変数を読み取り、コードを変更せずに設定を調整します。
なぜ重要か
CI のステップは環境変数を通じてツールを設定します。起動時にコピーされるというルールは、あるステップで設定した変数が別のステップに届かないことがある理由を説明します。このブロックを理解すると、シークレットや設定がどのように build コマンドへ流れ込むかが明確になります。
関連ガイド
What Is Working Directory Inheritance?Working directory inheritance means a child process starts in the same current directory as its parent unless…
What Is the Fork System Call?The fork system call creates a new process by duplicating the calling one, producing a child that is a near-i…
What Is the Exec System Call?The exec system call replaces the program running in the current process with a new one, keeping the same pro…