Quit and core dump (SIGQUIT)
Production Risk
Produces a core dump; useful for debugging but requires ulimit -c unlimited to capture.
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.
- 1User pressed Ctrl+\ in the terminal
- 2Another process sent SIGQUIT (kill -3 PID)
- 3A hung program that is not responding to Ctrl+C
User presses Ctrl+\ on a running process.
# 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
# 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
# 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.
GNU Bash Manual — Signals
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev