131
BashCRITICALCriticalSignalHIGH confidence

Quit and core dump (SIGQUIT)

Production Risk

Produces a core dump; useful for debugging but requires ulimit -c unlimited to capture.

What this means

Exit code 131 (128+3) indicates the process received SIGQUIT, typically via Ctrl+\. Unlike SIGINT (Ctrl+C), SIGQUIT produces a core dump by default, making it useful for debugging.

Why it happens
  1. 1User pressed Ctrl+\ in the terminal
  2. 2Another process sent SIGQUIT (kill -3 PID)
  3. 3A hung program that is not responding to Ctrl+C
How to reproduce

User presses Ctrl+\ on a running process.

trigger — this will error
trigger — this will error
# Press Ctrl+\ in terminal, or:
# kill -3 <PID>
# Process exits 131 and writes core dump

expected output

Quit (core dumped)
Exit: 131

Fix 1

Examine the core dump with gdb

WHEN Debugging a crash caused by SIGQUIT

Examine the core dump with gdb
# Set core dump location
ulimit -c unlimited
# Run program then press Ctrl+\
./myprogram
# Examine core dump
gdb ./myprogram core

Why this works

SIGQUIT produces a core dump; gdb can load it to inspect the stack trace and variables at the time of termination.

Fix 2

Use Ctrl+\ intentionally to kill hung processes

WHEN A process is not responding to Ctrl+C

Use Ctrl+\ intentionally to kill hung processes
# Ctrl+C sends SIGINT (catchable)
# Ctrl+\ sends SIGQUIT (produces core dump, harder to ignore)
# As a last resort before kill -9:
kill -QUIT <PID>

Why this works

Programs can trap SIGINT but many leave SIGQUIT at default; use it to stop stuck processes before resorting to SIGKILL.

Sources
Official documentation ↗

GNU Bash Manual — Signals

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All Bash errors