Question 170
A system shows this behavior: An administrator needs to inspect only exported variables passed to spawned processes. What underlying mechanism matters most?
Explanation
Correct Answer
The governing principle is env displays the process environment whereas set can include shell-local variables. The corresponding action is Run env and compare the output with shell variables reported by set, with confirmation that A deliberately unexported test variable is absent from env output.
Incorrect Answers
That statement explains another situation: A script schedules an alert if validation fails but the next command overwrites the exit status before checking it. The current observation instead depends on env displays the process environment whereas set can include shell-local variables.
That statement explains another situation: A Bash function in a profile must be available to the current shell without logging out. The current observation instead depends on env displays the process environment whereas set can include shell-local variables.
The related but distinct situation is “An operator changes PATH in one terminal but new child shells still use the old search path”. The decisive distinction is Child processes inherit exported environment variables rather than arbitrary shell variables. For the stated problem, “env displays the process environment whereas set can include shell-local variables” addresses the central condition.