Skip to main content

Module supervise

Module supervise 

Source
Expand description

Bounded child-command execution for the dispatching tools (ct-test, ct-each).

run_captured spawns a command with both streams captured, optionally feeds it literal stdin, and enforces an optional timeout: when the limit passes the child’s whole process group is killed (on Unix; the child alone elsewhere) and the run is reported as timed_out rather than aborting the tool — so a timeout folds into the framed verdict (ERROR, {CODE} = timeout) instead of producing an unexplained death.

resolve_program is the suite’s sibling resolution: a bare ct-* name is looked up next to the running executable before falling back to PATH, so the tools compose whether installed or freshly built.

Structs§

Outcome
What a supervised run produced.

Functions§

resolve_program
Resolve the program to launch. A bare ct-* name is resolved to a sibling of the current executable first — the same resolution the ct umbrella uses — so suite tools compose without PATH games; anything else launches by name via PATH.
run_captured
Run command to completion with stdout/stderr captured, writing stdin_text (if any) to its standard input, killing it if it outlives timeout.