Skip to main content

Module exec

Module exec 

Source
Expand description

Execution core: shim generation, PATH handling, anti-recursion real-binary resolution, process spawning, and classification/passthrough policy.

Modules§

classify
Command classification and passthrough policy (spec §11).
command_key
command_key helpers: strip cosmetic noise, keep significant args.
interactive
Interactive / watch / TTY detection (spec §21.3).
path
PATH manipulation, always over OsString (paths may be non-UTF8).
resolve
Anti-recursion real-binary resolution. Walk PATH left→right, skipping the shim dir and dejavu’s own dir, and return the first matching executable.
shim
Shim generation. Each shim is a minimal /bin/sh script that re-invokes dejavu run. Writes are idempotent (temp + atomic rename) and only touch files whose content or exec bit differs.
spawn
Process spawning behind a CommandRunner seam (so bench/tests can inject fixture output), plus the single exit-code normalization point.

Structs§

ExecOutcome
The result of running the real command.

Enums§

ExecMode
The decision the classifier hands to the runtime.
Family
Command families that Dejavu can optimize (spec §10.1).
PassthroughReason