Skip to content
Latchkey

SIGPIPE (Signal 13): Meaning, Exit Code 141 & Fix

SIGPIPE is Unix signal 13. A process terminated by it reports exit code 141 (128 + 13).

SIGPIPE is sent when a process writes to a closed pipe. When it kills a process, the shell reports exit code 141 - the 128 + signal-number convention.

What it means

Often benign - e.g. producer | head where head exits early - but can mask a real downstream crash.

When it happens in CI

  • A pipeline consumer (head, grep -q) closed early.
  • A real downstream process crashed mid-stream.

How to handle it

With pipefail, exit 141 surfaces; decide whether the early close is expected. Handle SIGPIPE in long-running writers.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →