pub fn exit_code_for(
outcome: &RunGraphOutcome,
signal: Option<CancellationSignal>,
) -> i32Expand description
Compute the process exit code for a finished
RunGraphOutcome per EXEC-021.
signal: Some(_)ALWAYS wins: returns128 + signal.posix_number()(130for SIGINT,143for SIGTERM). The user’s cancellation intent dominates any concurrent task failure (POSIX convention).- Otherwise, returns
EXIT_TASK_FAILUREwhen any of the following holds:outcome.task_errorsis non-empty.outcome.invariant_violationsis non-empty.- any entry in
outcome.outcomesis aRunOutcome::Completedwhose state isRunState::Failed.
- Otherwise, returns
0.
See the module-level documentation for the design rationale,
particularly around Skipped and Cancelled entries not
being independent failure indicators.