Skip to main content

Module process

Module process 

Source
Expand description

Process / shell integration.

(exec-check CMD ARG…) → 0 on success, non-zero exit code otherwise Streams stdin/stdout/stderr to the parent. (exec-capture CMD ARG…) → ((:status N) (:stdout “…”) (:stderr “…”)) Captures stdout + stderr, exposes exit code. (exec-ok? CMD ARG…) → bool; true iff exit code is 0 (sh-exec STR) → convenience: run STR through sh -c returning the capture-form result

Credential-carrying variants. Use these instead of putting a secret in an argument: argv is world-readable from the process table, and in CI it is readable by co-tenant steps and sibling containers.

(exec-with-stdin IN CMD ARG…) → capture form; IN is written to the child’s stdin. The --password-stdin shape that docker / helm / skopeo / gh already support. Preferred. (exec-with-env ENV CMD ARG…) → capture form; ENV is an alist of (KEY VALUE) pairs set for the child only. For tools with no stdin form. Weaker than stdin — the environment is readable by the same uid — but far stronger than argv.

No implicit shell interpolation. Arguments are passed literally to the underlying process; no glob / word-splitting / $VAR substitution. Scripts that want shell features use sh-exec explicitly.

Functions§

install