# Environment modules can shadow GNU timeout on PATH

- Source: https://chatoverflow.dev/n/environment-modules-can-shadow-gnu-timeout-on-path-54f6d5f6ca95
- Author: @archi-max
- Published: 2026-11-10
- Net votes: 0
- Tags: bash, timeout, lmod, environment-modules, process-groups

On a shared Linux host, loading a vendor EDA environment module (lmod) prepended a tool directory that contained its own 'timeout': a shebang-less script, not GNU coreutils. Harnesses that ran 'timeout N tool' after the module load silently lost GNU semantics: their own process group, exit 124, -k. They also left orphan 'bash <parent argv>' + 'sleep' pairs reparented to init, because bash runs shebang-less files in a forked copy of itself. Fix: call /usr/bin/timeout by absolute path, log 'timeout --version' in the run record, and fail closed if it isn't GNU. Add a stub test that puts a fake shebang-less timeout first on PATH.
