Exit codes & signals · Unix · Docker · curl

What does that exit code mean?

Type an exit status, a signal number, or a name like SIGKILL. ExitCode tells you what killed the process — 137 is an out-of-memory SIGKILL, 143 is a graceful SIGTERM, 139 is a segfault — with the cause and the fix.

137error
Killed by SIGKILL (128 + 9)
137 = 128 + 9 (SIGKILL)

The process was force-killed and could not clean up.

causeMost often an out-of-memory kill: the Linux OOM killer, or Docker/Kubernetes enforcing a memory limit (shown as OOMKilled). It can also be a manual `kill -9` or an orchestrator escalating after a SIGTERM was ignored.

fixCheck `dmesg` / kernel logs for "Out of memory", and in containers compare usage against the memory limit. Raise the limit or reduce memory use; make sure the app shuts down on SIGTERM so it is never escalated to SIGKILL.

SIGKILLsignal 9Terminate (uncatchable)

Static lookup, in your browser. Signal numbers are the standard Linux x86-64/ARM values; some differ on other architectures. The exit code alone never replaces reading the program’s own logs.

Unix signals (and the exit code they produce)

A process killed by signal N exits with status 128 + N. These are the standard Linux x86-64/ARM numbers; SIGUSR1, SIGUSR2 and SIGBUS differ on some architectures.

SignalNo.ExitDefaultMeaning
SIGHUP1129TerminateHangup — controlling terminal closed or the controlling process died. Often used to tell daemons to reload config.
SIGINT2130TerminateInterrupt from the keyboard (Ctrl-C).
SIGQUIT3131Core dumpQuit from the keyboard (Ctrl-\); also dumps core.
SIGILL4132Core dumpIllegal instruction — corrupted binary or bad CPU instruction.
SIGTRAP5133Core dumpTrace/breakpoint trap, used by debuggers.
SIGABRT6134Core dumpAbort — from abort(), a failed assertion, glibc heap corruption, or an uncaught C++ exception.
SIGBUS7135Core dumpBus error — bad memory access, e.g. misaligned access or a truncated mmap.
SIGFPE8136Core dumpArithmetic exception, e.g. integer divide-by-zero or overflow.
SIGKILL9137Terminate (uncatchable)Killed immediately; cannot be caught, blocked, or ignored. Sent by `kill -9` and by the Linux OOM killer.
SIGUSR110138TerminateUser-defined signal 1 (application-specific).
SIGSEGV11139Core dumpSegmentation fault — invalid memory reference; almost always a bug in native code.
SIGUSR212140TerminateUser-defined signal 2 (application-specific).
SIGPIPE13141TerminateBroken pipe — wrote to a pipe or socket with no reader.
SIGALRM14142TerminateTimer expired (alarm()).
SIGTERM15143TerminatePolite termination request — the default of `kill` and the signal orchestrators send to ask a process to shut down.
SIGSTKFLT16144TerminateStack fault on coprocessor (rarely used).
SIGCHLD17145IgnoreA child process stopped or terminated.
SIGCONT18146ContinueContinue a process if it was stopped.
SIGSTOP19147Stop (uncatchable)Stop the process; cannot be caught or ignored.
SIGTSTP20148StopStop typed at the terminal (Ctrl-Z).
SIGTTIN21149StopBackground process tried to read from the terminal.
SIGTTOU22150StopBackground process tried to write to the terminal.
SIGURG23151IgnoreUrgent (out-of-band) data on a socket.
SIGXCPU24152Core dumpCPU time limit exceeded (ulimit).
SIGXFSZ25153Core dumpFile size limit exceeded (ulimit).
SIGVTALRM26154TerminateVirtual timer expired.
SIGPROF27155TerminateProfiling timer expired.
SIGWINCH28156IgnoreTerminal window size changed.
SIGIO29157TerminateI/O is now possible (SIGPOLL).
SIGPWR30158TerminatePower failure.
SIGSYS31159Core dumpBad system call (e.g. blocked by a seccomp filter).

Common process & shell 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

curl uses its own numbering, unrelated to signals — switch the decoder to the curl tab.

CodeNameMeaning
1UNSUPPORTED_PROTOCOLUnsupported protocol — this build of curl has no support for it.
2FAILED_INITFailed to initialize.
3URL_MALFORMATThe URL was malformed.
5COULDNT_RESOLVE_PROXYCouldn't resolve the proxy host.
6COULDNT_RESOLVE_HOSTCouldn't resolve the host — DNS failure or a typo in the hostname.
7COULDNT_CONNECTFailed to connect to the host or proxy — wrong port, firewall, or service down.
8WEIRD_SERVER_REPLYThe server sent data curl could not parse.
9REMOTE_ACCESS_DENIEDAccess to the remote resource was denied.
18PARTIAL_FILEThe transfer ended early — fewer bytes arrived than expected.
22HTTP_RETURNED_ERRORWith -f/--fail, the server returned an HTTP status of 400 or higher.
23WRITE_ERRORCould not write the received data to the local file or disk.
26READ_ERRORCould not read the local file you tried to upload.
27OUT_OF_MEMORYA memory allocation request failed.
28OPERATION_TIMEDOUTThe operation timed out (--max-time / --connect-timeout reached).
35SSL_CONNECT_ERRORThe TLS/SSL handshake failed — protocol or cipher mismatch.
43BAD_FUNCTION_ARGUMENTInternal error: a function was called with a bad argument.
47TOO_MANY_REDIRECTSToo many redirects (raise with --max-redirs).
51PEER_FAILED_VERIFICATIONThe server's certificate or fingerprint failed verification.
52GOT_NOTHINGThe server returned nothing (an empty reply).
55SEND_ERRORFailed sending network data.
56RECV_ERRORFailure receiving network data.
58SSL_CERTPROBLEMProblem with the local client certificate.
60PEER_FAILED_VERIFICATIONThe CA cert is unknown or the certificate is invalid/expired/self-signed (add --cacert or fix the chain).
61BAD_CONTENT_ENCODINGUnrecognized transfer encoding.
63FILESIZE_EXCEEDEDMaximum file size exceeded (--max-filesize).
67LOGIN_DENIEDThe server denied login — wrong username or password.
77SSL_CACERT_BADFILEProblem reading the SSL CA cert.
78REMOTE_FILE_NOT_FOUNDThe remote file was not found.

How ExitCode reads a status

  1. Standard codes: 0 success, 1 generic error, 2 usage/syntax error, 126 not executable, 127 not found, 128 bad exit argument, 255 out of range or fatal.
  2. Signals: any status of 128 + N means "killed by signal N" — ExitCode subtracts 128 and names the signal (137 -> SIGKILL, 143 -> SIGTERM, 139 -> SIGSEGV).
  3. Context matters: the Docker/Kubernetes lens adds 125 (docker run failed) and the OOMKilled reading of 137; the curl lens uses curl's own ~30 transfer error codes.
  4. You can type a number, a signal name (SIGKILL or just "kill"), or an expression like 128+9.

The exit code is a starting point, not a diagnosis. The same number can come from very different causes, so always confirm against the program’s own logs, dmesg, or your orchestrator’s events.

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.