KTSTR_KERNEL_ENV

Constant KTSTR_KERNEL_ENV 

Source
pub const KTSTR_KERNEL_ENV: &str = "KTSTR_KERNEL";
Expand description

§KTSTR_* env-var empty-string contract

Default policy across KTSTR_* env vars: empty string is treated as unset (falls back to the same default the var would use if absent). This prevents the “stale shell export” footgun where an operator’s previous KTSTR_FOO=... export gets cleared by the new shell (KTSTR_FOO=) but the empty value is still observed by child processes — without the empty-as-unset rule, child code would see “set” via env::var(...).is_ok() and try to use the empty value as data, producing confusing failures far from the export site.

Per-const docs flag deviations from this default explicitly: presence-only markers (e.g. KTSTR_ORCHESTRATED_ENV) treat empty as set per documented contract; value-typed vars (e.g. path overrides like KTSTR_HOST_CGROUP_PARENT_ENV) follow the empty-as-unset default and surface the fallback at the resolver site.

New KTSTR_* env vars must pick a policy at the const-decl doc and the reader site must honor it; mixed empty-treatment within one var is a footgun.

Name of the environment variable that selects a kernel for every ktstr entry point (ktstr run, ktstr shell, cargo ktstr test, in-process tests, post-run analysis). Single source of truth so the name is not spelled by hand at each reader; if the name ever changes, the change lands in one place instead of fanning out to every call site.