You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Protect Tcl sub-interpreter creation with quarantine mechanism
Environment variables put in quarantine are restored to their original
value early at modulecmd.tcl start so that modulercs and modulefiles
see the environment they expect. But the Tcl sub-interpreters used to
evaluate these scripts are created after this restore and their
initialization reads variables like TCL_LIBRARY from the environment.
If such a variable designates a broken Tcl installation, for instance
activated by a loaded module, sub-interpreter creation fails which
prevents modulerc and modulefile evaluation.
Set quarantine variables to their defined runtime value or unset them
during sub-interpreter creation, then restore their original value
once interp is created. A variable set during creation then unset
afterward is also unset in the created interp: the env entry recorded
in this interp at creation time is not removed by the unset made in
the master interp and a read attempt on it would raise a "no such
variable" error.
Variable name validation of the run_quarantine configuration option is
factored into the getQuarantineVarList procedure, shared with the
quarantine release code run at start time. As this procedure clears
duplicate entries, a variable listed twice is no more unset when
released from quarantine.
Fixes#623
Assisted-by: Claude:claude-fable-5
Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
0 commit comments