Skip to main content

execute_pipeline

Function execute_pipeline 

Source
pub fn execute_pipeline(
    ctx: &mut ExecContext<'_>,
    pipeline: &Pipeline,
) -> Result<RunResult, BuiltinError>
Expand description

Execute a pipeline: run each command with stdin from previous stage (or ctx.stdin for first), stdout to a buffer; last command’s stdout is written to ctx.stdout. Redirects override pipe.

Non-final stages buffer all stdout in host memory; size is capped at PIPELINE_INTER_STAGE_MAX_BYTES (design §8.2).

§Errors

Returns BuiltinError if any command or redirect fails.

§Panics

Panics if the pipeline state is inconsistent (non-first stage without pipe input); this is a programming error.