You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] All-external pipeline members do not die of SIGPIPE: EPIPE exit 1 + leaked diagnostics, PIPESTATUS 1 instead of 141 #1580
In an all-external pipeline, upstream members whose consumer closes early do not die of SIGPIPE. They exit 1 via EPIPE errors, leak their own Broken pipe diagnostics to the shell's stderr, and PIPESTATUS records 1 instead of 141.
Regression seed
yes | cat | head -1
echo"PIPESTATUS=${PIPESTATUS[*]}"
Measured (Linux, debug build of master ec279df tree vs self-compiled GNU bash 5.3.20)
GNU: stdout y, PIPESTATUS=141 141 0, stderr silent.
rubash: stdout y, plus stderr cat: write error: Broken pipe and yes: standard output: Broken pipe, PIPESTATUS=1 1 0.
Mechanism candidate (from the executor architecture audit)
The concurrent pipeline path is topologically first-class (real processes, real pipes). The seam is the child's signal birth environment: the whole pipeline execution runs inside a SIGPIPE-blocked bracket (sigpipe_block_guard around execute_pipeline_command, src/executor/pipeline_exec.rs ~:410), children inherit the blocked mask, and pre_exec resets disposition but not the mask — so the kernel never delivers SIGPIPE and writes surface as EPIPE instead. A synthetic 141 exists on some paths (lingerer_sigpipe_status) but not this one. Fix direction: restore SIGPIPE mask + SIG_DFL in the child's pre_exec so members die naturally and 141 comes from wait decoding.
Distinct from #382 (hard-killed lingerer reporting 1) and #1333 (entry-ignored SIGPIPE reset): different path, different root cause.
Source: executor architecture audit (arch-audit B, candidate C2), probe p2b_sigpipe3.sh double-run on oracle and current build.
Activity
Merge master a9385b4 into fix6/pipe-diag (pipe-diag integration)