Exit codes & signals

What does that exit code mean?

A process killed by signal N exits with 128 + N: 137 = SIGKILL (often OOMKilled), 143 = SIGTERM, 139 = SIGSEGV, 130 = Ctrl-C.

Open the full decoder ↗

Unix signals

SignalNo.ExitMeaning
SIGHUP1129Hangup — controlling terminal closed or the controlling process died. Often used to tell daemons to reload config.
SIGINT2130Interrupt from the keyboard (Ctrl-C).
SIGQUIT3131Quit from the keyboard (Ctrl-\); also dumps core.
SIGILL4132Illegal instruction — corrupted binary or bad CPU instruction.
SIGTRAP5133Trace/breakpoint trap, used by debuggers.
SIGABRT6134Abort — from abort(), a failed assertion, glibc heap corruption, or an uncaught C++ exception.
SIGBUS7135Bus error — bad memory access, e.g. misaligned access or a truncated mmap.
SIGFPE8136Arithmetic exception, e.g. integer divide-by-zero or overflow.
SIGKILL9137Killed immediately; cannot be caught, blocked, or ignored. Sent by `kill -9` and by the Linux OOM killer.
SIGUSR110138User-defined signal 1 (application-specific).
SIGSEGV11139Segmentation fault — invalid memory reference; almost always a bug in native code.
SIGUSR212140User-defined signal 2 (application-specific).
SIGPIPE13141Broken pipe — wrote to a pipe or socket with no reader.
SIGALRM14142Timer expired (alarm()).
SIGTERM15143Polite termination request — the default of `kill` and the signal orchestrators send to ask a process to shut down.
SIGSTKFLT16144Stack fault on coprocessor (rarely used).
SIGCHLD17145A child process stopped or terminated.
SIGCONT18146Continue a process if it was stopped.
SIGSTOP19147Stop the process; cannot be caught or ignored.
SIGTSTP20148Stop typed at the terminal (Ctrl-Z).
SIGTTIN21149Background process tried to read from the terminal.
SIGTTOU22150Background process tried to write to the terminal.
SIGURG23151Urgent (out-of-band) data on a socket.
SIGXCPU24152CPU time limit exceeded (ulimit).
SIGXFSZ25153File size limit exceeded (ulimit).
SIGVTALRM26154Virtual timer expired.
SIGPROF27155Profiling timer expired.
SIGWINCH28156Terminal window size changed.
SIGIO29157I/O is now possible (SIGPOLL).
SIGPWR30158Power failure.
SIGSYS31159Bad system call (e.g. blocked by a seccomp filter).

Common exit codes

CodeMeaning
0Success.
1General / catch-all error.
2Shell builtin misuse or a CLI usage error (many tools use 2 for bad arguments).
126Command found but not executable (permission denied, or it is a directory).
127Command not found — typo or not on PATH.
128Invalid argument to exit (valid range is 0-255).
130Terminated by SIGINT (128 + 2) — Ctrl-C.
134Terminated by SIGABRT (128 + 6) — abort()/assert.
137Terminated by SIGKILL (128 + 9) — often an out-of-memory kill.
139Terminated by SIGSEGV (128 + 11) — segmentation fault.
143Terminated by SIGTERM (128 + 15) — graceful shutdown request.
255Exit status out of range (e.g. `exit -1`) or a generic fatal error.

Common curl exit codes

CodeMeaning
1Unsupported protocol — this build of curl has no support for it.
2Failed to initialize.
3The URL was malformed.
5Couldn't resolve the proxy host.
6Couldn't resolve the host — DNS failure or a typo in the hostname.
7Failed to connect to the host or proxy — wrong port, firewall, or service down.
8The server sent data curl could not parse.
9Access to the remote resource was denied.
18The transfer ended early — fewer bytes arrived than expected.
22With -f/--fail, the server returned an HTTP status of 400 or higher.
23Could not write the received data to the local file or disk.
26Could not read the local file you tried to upload.
27A memory allocation request failed.
28The operation timed out (--max-time / --connect-timeout reached).
35The TLS/SSL handshake failed — protocol or cipher mismatch.
43Internal error: a function was called with a bad argument.
47Too many redirects (raise with --max-redirs).
51The server's certificate or fingerprint failed verification.
52The server returned nothing (an empty reply).
55Failed sending network data.
56Failure receiving network data.
58Problem with the local client certificate.
60The CA cert is unknown or the certificate is invalid/expired/self-signed (add --cacert or fix the chain).
61Unrecognized transfer encoding.
63Maximum file size exceeded (--max-filesize).
67The server denied login — wrong username or password.
77Problem reading the SSL CA cert.
78The remote file was not found.

Questions

What does an exit code above 128 mean?

On Unix, when a process is killed by a signal, its exit status is 128 plus the signal number. So 137 = 128 + 9 = SIGKILL, 143 = 128 + 15 = SIGTERM, 139 = 128 + 11 = SIGSEGV, and 130 = 128 + 2 = SIGINT (Ctrl-C). ExitCode does that subtraction for you and names the signal.

Why does my container exit with 137 (OOMKilled)?

Exit 137 means the process got SIGKILL. In Docker and Kubernetes that is almost always the out-of-memory killer enforcing a memory limit (Kubernetes labels it OOMKilled), or an orchestrator escalating to SIGKILL after a SIGTERM was ignored past the grace period. Compare the container's memory usage against its limit, raise the limit or reduce usage, and make sure the app exits promptly on SIGTERM.

What is the difference between 126 and 127?

127 means the command was not found at all — a typo, a missing package, or it is not on PATH (very common in minimal containers). 126 means the command was found but could not be executed — usually a missing execute bit, a non-executable file, or a bad interpreter line in a script.

Are these signal numbers the same on every system?

The common ones (SIGKILL 9, SIGTERM 15, SIGINT 2, SIGSEGV 11, SIGABRT 6) are the same across Linux and most Unix. A few — SIGUSR1, SIGUSR2, SIGBUS — have different numbers on MIPS, Alpha, and SPARC, and real-time signals occupy 34-64. ExitCode uses the standard Linux x86-64/ARM numbers.

Why does curl use different exit codes?

curl has its own numbering that is unrelated to signals: 6 is "couldn't resolve host", 7 is "couldn't connect", 28 is a timeout, 60 is a TLS certificate problem, and 22 means the server returned an HTTP error of 400+ when you used -f/--fail. Switch the context to "curl" to decode those, since the same number means something completely different there.

Does anything I type get sent anywhere?

No. ExitCode is a static lookup that runs entirely in your browser. There is no backend, no logging, and nothing leaves the page.

Open the full decoder ↗