SIGPIPE (Signal 13) in CI: Broken Pipe and Exit 141
SIGPIPE is Unix signal 13, sent when a process writes to a closed pipe. A process killed by it reports exit code 141 (128 + 13).
SIGPIPE is often benign - a classic producer | head where the consumer exits early - but with pipefail it can fail the job and occasionally masks a real downstream crash.
What it means
Signal 13 fires when a process writes to a pipe whose reader has gone away. The default action terminates the writer; the shell reports 141.
When it happens in CI
- A pipeline consumer (
head,grep -q) closed early. - A real downstream process crashed mid-stream.
set -o pipefailpromoted SIGPIPE to a failure.
How to handle it
Decide whether the early close is expected (then ignore it deliberately) or masks a real crash. Handle SIGPIPE in long-running writers, or restructure the pipeline so the consumer reads fully.
Related guides
Exit Codes and Signals in CI/CD: A Practical GuideA practical guide to process exit codes and signals in CI/CD - what 1, 2, 124, 126, 127, 130, 137, and 143 me…
CI Exit Code Lookup: What Does This Exit Code Mean?Instant lookup for CI/CD process exit codes - enter a code (137, 127, 143…) to see what it means, whether it…
Exit Code 141 in CI: SIGPIPE / Broken Pipe with pipefailExit code 141 means a process was killed by SIGPIPE (128 + 13) - a write to a closed pipe, surfaced by pipefa…