Exit Code & Signal Reference
Your process exited 137 — this page says what killed it, how the 128+N signal band works, and where macOS and Linux numbering differs.
A code like 137, a name like SIGTERM, or any number to see the 8-bit wrap. Nothing you type leaves this page.
Type an exit code or a signal name to see what it means, what raised it, and how the 128 + N band derives it.
All 67 rows shown
Exit codes
137, 139 and 143 are identical on both platforms: SIGKILL, SIGSEGV and SIGTERM sit at 9, 11 and 15 on macOS and Linux alike.
| Code | Meaning | What usually raised it | What to check next | Provenance |
|---|---|---|---|---|
| 0 | Success | The command finished and reported success — by convention the only exit code that means no error. | Nothing to fix. In scripts, if-statements and && treat 0 as true. | Executed |
| 1 | General error | The catch-all failure code: false exits 1, and most programs use it for any unspecified error. | Read the program's own error output — 1 by itself says nothing more specific. | Executed |
| 2 | Shell usage error | Bash reports misuse of a shell builtin or a script syntax error as 2, and many utilities reuse it for bad command-line usage. | Check the command's syntax and flags against its manual page. | Cited |
| 126 | Found but not executable | The file exists but could not be run — usually a missing execute bit or a broken interpreter line. | Inspect it with ls -l and check the #! line; chmod +x if it should run. | Executed |
| 127 | Command not found | No file by that name was found on PATH — a typo, or the program simply is not installed. | Check the spelling and PATH; command -v prints what the shell would actually run. | Executed |
| 128 | Signal band base | 128 marks the base of the 128 + N band. A plain 128 from a program is the program's own choice, not a signal death. | Treat it as application-defined and check the program's documentation. | Cited |
| 129 | Killed by SIGHUP | The controlling terminal closed or the session ended; daemons also reuse HUP to mean reload configuration. | If it died with your terminal, run it under nohup, tmux or a service manager. | Cited |
| 130 | Killed by SIGINT | Interrupted from the keyboard — Ctrl-C sends SIGINT to the foreground job. | Usually deliberate; in scripts, treat 130 as the user cancelled. | Cited |
| 131 | Killed by SIGQUIT | Quit from the keyboard (Ctrl-backslash) — like Ctrl-C but with a core dump. | Look for a core file if you need the stack; otherwise treat it as a cancel. | Cited |
| 132 | Killed by SIGILL | The CPU hit an illegal instruction — often a binary built for the wrong architecture, or corrupted. | Check the binary's architecture against the machine and rebuild for the right target. | Cited |
| 133 | Killed by SIGTRAP | A trace or breakpoint trap fired with no debugger attached to absorb it. | Run it under a debugger, or remove the stray breakpoint or int3. | Cited |
| 134 | Killed by SIGABRT | The program called abort() — failed assertions, allocator heap checks and unhandled C++ exceptions land here. | Read stderr for the assertion message and capture a core dump for the stack. | Cited |
| 136 | Killed by SIGFPE | A fatal arithmetic error — integer division by zero is the classic trigger despite the floating-point name. | Find the division or overflow; a core dump names the exact instruction. | Cited |
| 137 | Killed by SIGKILL | Something sent SIGKILL, which cannot be caught. In Kubernetes and Docker that is usually an out-of-memory kill or an enforced limit — but 137 itself says only that it was SIGKILLed. | Check dmesg for oom-kill records, or the container runtime's events; confirm before raising memory limits. | Executed |
| 139 | Killed by SIGSEGV | Segmentation fault — the process touched memory it does not own; a bug in the program or a native extension. | Capture a core dump or run under a debugger; update the crashing library first. | Executed |
| 141 | Killed by SIGPIPE | It wrote to a pipe whose reader had already exited — yes | head kills yes exactly this way. | Often benign in pipelines; handle EPIPE or ignore SIGPIPE where it matters. | Cited |
| 142 | Killed by SIGALRM | An alarm(2) timer expired — timeout wrappers and watchdogs use it. | Raise or remove the timeout if the work was legitimate. | Cited |
| 143 | Killed by SIGTERM | The polite termination request — a plain kill, and what init systems and orchestrators send first at shutdown. | Usually an orderly shutdown; if unexpected, find which supervisor sent it and why. | Executed |
| 255 | Out-of-range exit | exit -1 and other out-of-range values wrap to 255; ssh also reports its own connection failures as 255. | Read the program's error output; from ssh, 255 means the connection itself failed rather than the remote command. | Executed |
Signals
macOS numbers were executed with kill -l on this machine; Linux numbers are cited from signal(7). The default-action column follows signal(7) — where macOS differs, the cause column says so in words. Where the code column shows a pair, it reads macOS / Linux.
| Signal | macOS | Linux | Code | Default action | What usually raised it |
|---|---|---|---|---|---|
| SIGHUP | 1 | 1 | 129 | Terminate | Terminal closed or session ended; daemons reuse it to mean reload. |
| SIGINT | 2 | 2 | 130 | Terminate | Ctrl-C from the keyboard. |
| SIGQUIT | 3 | 3 | 131 | Terminate + core dump | Ctrl-backslash from the keyboard; dumps core. |
| SIGILL | 4 | 4 | 132 | Terminate + core dump | Illegal CPU instruction — wrong-architecture or corrupted binary. |
| SIGTRAP | 5 | 5 | 133 | Terminate + core dump | Trace or breakpoint trap — debugger machinery. |
| SIGABRT | 6 | 6 | 134 | Terminate + core dump | abort() — failed assertions and heap-check failures. |
| SIGEMT | 7 | not on Linux | 135 | Terminate + core dump | Emulator trap. macOS-only: Linux does not define it on x86-64 or ARM64. |
| SIGFPE | 8 | 8 | 136 | Terminate + core dump | Fatal arithmetic error — classically integer division by zero. |
| SIGKILL | 9 | 9 | 137 | Terminate | Unconditional kill — cannot be caught, blocked or ignored. |
| SIGBUS | 10 | 7 | 138 / 135 | Terminate + core dump | Bus error — misaligned or unmapped memory access. |
| SIGSEGV | 11 | 11 | 139 | Terminate + core dump | Segmentation fault — memory the process does not own. |
| SIGSYS | 12 | 31 | 140 / 159 | Terminate + core dump | Bad system call — on Linux, seccomp violations land here. |
| SIGPIPE | 13 | 13 | 141 | Terminate | Write to a pipe or socket with no reader. |
| SIGALRM | 14 | 14 | 142 | Terminate | alarm(2) timer expired. |
| SIGTERM | 15 | 15 | 143 | Terminate | Polite termination request — the default kill. |
| SIGURG | 16 | 23 | 144 / 151 | Ignored | Urgent, out-of-band data arrived on a socket. |
| SIGSTOP | 17 | 19 | 145 / 147 | Stop | Unconditional stop — cannot be caught; SIGCONT resumes. |
| SIGTSTP | 18 | 20 | 146 / 148 | Stop | Ctrl-Z from the keyboard — a stop the process may catch. |
| SIGCONT | 19 | 18 | 147 / 146 | Continue | Resumes a stopped process. |
| SIGCHLD | 20 | 17 | 148 / 145 | Ignored | A child process stopped or exited. |
| SIGTTIN | 21 | 21 | 149 | Stop | A background job read from the terminal. |
| SIGTTOU | 22 | 22 | 150 | Stop | A background job wrote to the terminal. |
| SIGIO | 23 | 29 | 151 / 157 | Terminate | I/O became possible on a watched descriptor. Default diverges: Linux terminates, macOS ignores it. |
| SIGXCPU | 24 | 24 | 152 | Terminate + core dump | CPU time limit (RLIMIT_CPU) exceeded. Linux dumps core; macOS terminates without one. |
| SIGXFSZ | 25 | 25 | 153 | Terminate + core dump | File size limit (RLIMIT_FSIZE) exceeded. Linux dumps core; macOS terminates without one. |
| SIGVTALRM | 26 | 26 | 154 | Terminate | Virtual (CPU-time) interval timer expired. |
| SIGPROF | 27 | 27 | 155 | Terminate | Profiling interval timer expired. |
| SIGWINCH | 28 | 28 | 156 | Ignored | The terminal window changed size. |
| SIGINFO | 29 | not on Linux | 157 | Ignored | Status request from the keyboard (Ctrl-T). macOS-only. |
| SIGUSR1 | 30 | 10 | 158 / 138 | Terminate | User-defined signal 1 — each program assigns its own meaning. |
| SIGUSR2 | 31 | 12 | 159 / 140 | Terminate | User-defined signal 2 — each program assigns its own meaning. |
| SIGSTKFLT | not on macOS | 16 | 144 | Terminate | Coprocessor stack fault — defined on Linux, unused in practice. |
| SIGPWR | not on macOS | 30 | 158 | Terminate | Power failure notice. Linux-only. |
sysexits.h
sysexits.h is a BSD convention, not a standard — outside BSD tools and some mail software almost nothing honours it. Treat these rows as a naming scheme you may adopt, not behaviour you can rely on.
| Code | Name | Meaning | What to check next | Provenance |
|---|---|---|---|---|
| 64 | EX_USAGE | Command line usage error — wrong arguments or flags. | Fix the invocation; the tool's usage text shows the accepted shape. | Cited |
| 65 | EX_DATAERR | The input data was incorrect in some way. | Validate the input file or record it names. | Cited |
| 66 | EX_NOINPUT | An input file did not exist or was not readable. | Check the path and read permission. | Cited |
| 67 | EX_NOUSER | The user or addressee did not exist. | Check the account or address you passed. | Cited |
| 68 | EX_NOHOST | The host did not exist. | Check the hostname and its DNS record. | Cited |
| 69 | EX_UNAVAILABLE | A required service or resource was unavailable. | Check that the dependency is up, then retry. | Cited |
| 70 | EX_SOFTWARE | An internal software error was detected. | Treat it as the program's own bug; collect its logs. | Cited |
| 71 | EX_OSERR | An operating-system error, such as a failed fork. | Check system limits and resources (processes, memory). | Cited |
| 72 | EX_OSFILE | A critical OS file was missing or unusable. | Verify the system file it names exists and is readable. | Cited |
| 73 | EX_CANTCREAT | A user-specified output file could not be created. | Check the target directory exists and is writable. | Cited |
| 74 | EX_IOERR | An error occurred while doing I/O on a file. | Check the disk and filesystem the file lives on. | Cited |
| 75 | EX_TEMPFAIL | Temporary failure — retrying later may succeed. | Retry with backoff before treating it as fatal. | Cited |
| 76 | EX_PROTOCOL | The remote side replied incorrectly during an exchange. | Capture the exchange; the peer, not the network, is suspect. | Cited |
| 77 | EX_NOPERM | Insufficient permission — not a plain file-mode problem. | Check the credentials and ownership the operation needs. | Cited |
| 78 | EX_CONFIG | Something was found in an unconfigured or misconfigured state. | Diff the configuration against a known-good example. | Cited |
Do it offline:$ kill -l
How to use it
- Get the code. In a shell, echo $? prints the exit status of the last command — read it immediately, because the very next command replaces it. Press / here to focus the code field.
- Type the number. 137 answers with its derivation — 128 + 9, SIGKILL — plus what usually raises that signal and what to check next. Numbers outside 0–255 show the 8-bit wrap a real shell would apply.
- Type a signal name instead when that is what you have: SIGTERM, sigusr1 and plain kill all resolve to their numbers on both platforms and the exit codes they produce.
- Switch the platform toggle when the process ran elsewhere: most numbers agree, but USR1, USR2, BUS and SYS do not, and the answer pane follows the platform you pick.
Your process died with 137, 139 or 143 and the number is all you have. This page reads it for you: the shell conventions, the 128 + N signal band, the full signal table with macOS and Linux numbering side by side, and the BSD sysexits.h list. Type a code or a signal name to get the derivation — everything resolves on this page, and nothing you type leaves it.
How it works
An exit status is a single byte. A process hands the kernel an integer; the shell shows you its low 8 bits, so every status you will ever read is 0 through 255. exit 256 wraps to 0, exit -1 to 255, exit 300 to 44 — all three are executed by this page's test suite against /bin/sh, not assumed.
The 128 + N band is a shell convention, not kernel truth. When a child dies from a signal, the kernel reports the signal number to the parent through the wait status; POSIX shells then encode it for you as 128 plus the signal number. 137 is 128 + 9 because SIGKILL is 9; 143 is 128 + 15 because SIGTERM is 15.
A number alone cannot name a cause. 137 says a SIGKILL arrived — it cannot say whether the kernel's out-of-memory killer sent it, a container runtime enforced a limit, or a person typed kill -9. The cause column here says what usually raises each signal, and the next-step column says where the real evidence lives.
Signal numbers are only mostly portable, so this page keeps two columns and labels its sources: every macOS number was executed with kill -l on this machine, every Linux number is cited from signal(7), and the hero codes 137, 139 and 143 are identical on both. Exit codes are process plumbing — HTTP status codes are a different code space with their own reference page.
Examples
137137 = 128 + 9 — SIGKILLThe derivation line: 137 sits in the signal band, and 137 minus 128 is 9, SIGKILL — the kill that cannot be caught. The test suite reproduces this by really running kill -9 against a shell.
143143 = 128 + 15 — SIGTERMSIGTERM is the polite shutdown request init systems send first, so 143 usually means an orderly stop rather than a crash.
sigusr1SIGUSR1 is signal 30 on macOS and 10 on Linux.The divergence in one line: a page that prints a single number for SIGUSR1 is wrong on one platform, so this one prints both.
256256 wraps to 0 — a shell reports only the low 8 bits.Executed, not assumed: /bin/sh -c 'exit 256' really reports 0. An exit argument is reduced modulo 256 before anyone sees it.
127127 — Command not foundThe shell itself answers 127 when no file by that name is on PATH — verified here by executing a command that does not exist.
6464 — EX_USAGEThe first sysexits.h value: command line usage error. A BSD convention some tools adopt — not behaviour you can rely on.
Every example on this page is executed against the same engine that powers the tool, on every build.
Gotchas worth knowing
126 and 127 are different failures
127 means the command was never found; 126 means it was found but could not be executed — a missing execute bit or a broken interpreter line. Both come from the shell, not the program, and both are executed live by this page's test suite.
The 128 + N band can collide with ordinary codes
Nothing stops a program from calling exit(137) on its own. The band is a reporting convention for signal deaths, not a reserved range — so 137 usually means SIGKILL, and occasionally means a program that chose that number itself.
$? holds only the last command in a pipeline
In a | b, the status you read afterwards is b's alone — a may have died with a signal and you would never see it there. Bash keeps the per-stage statuses in PIPESTATUS if you need them.
exit keeps the low 8 bits
exit 256 reports 0, exit -1 reports 255, exit 300 reports 44 — all executed against /bin/sh here. A non-numeric argument is shell-dependent: this machine's sh answers 255 after an error.
SIGKILL and SIGSTOP cannot be caught
Every other signal can be handled, blocked or ignored by the process; those two act regardless. That is why 137 carries no cleanup: the process got no chance to run any.
Real-time signals are out of table scope
Linux also defines SIGRTMIN through SIGRTMAX above the classic 31. Their numbering shifts with the C library's internals, so codes above 159 resolve to no row here on purpose.
Common errors
That query is longer than 64 characters — only its first 64 were read. An exit code is at most three digits and no signal name is longer than nine characters.- The cap refusal. The field never silently clips: the engine reads the first 64 characters, answers from them, and says so.
That looks like a number but not a whole one — an exit status is an integer, so decimals and infinities have no row here.- The answer to 12.5 and friends. Wait statuses are integers by construction, so a fractional query gets a refusal, not a guess.
That number is outside the range this page reasons about — beyond a 32-bit integer, shells disagree about exit arguments before the 8-bit wrap even applies.- The honest boundary: past 32 bits, shells stop agreeing — this machine's /bin/sh silently wraps exit 4294967297 to 1 without a word on stderr — so the page refuses rather than presenting one shell's habit as the rule.
That value is outside 0–255, so the shell keeps only its low 8 bits — the wait status shown is what a parent process actually sees.- The wrap note beside answers like 256 → 0 and -1 → 255. The answer pane shows the wrapped code and this banner explains why.
No signal by that number or name exists on the selected platform — macOS and Linux each define signals the other lacks, and above 31 the band runs into platform-specific real-time signals this table does not cover.- The answer to SIGSTKFLT on macOS, SIGINFO on Linux, or a code like 160 whose derived signal number exceeds the classic table.
Nothing on this page matches that — most exit codes outside 0–2, 64–78, 126–128 and the 128+N band mean whatever the exiting program decided, so its own manual is the only authority.- The no-match state, and an honest one: for most codes the only documentation that exists is the program's own.
FAQ
What does exit code 137 mean?
137 means the process was killed by SIGKILL — 128 + 9. In Kubernetes and Docker that is usually an out-of-memory kill or an enforced limit, but 137 itself says only that it was SIGKILLed; dmesg oom-kill records or the runtime's events are what confirm the cause.
Why does Ctrl-C give exit code 130?
Ctrl-C sends SIGINT, signal 2, to the foreground job. A process that dies from it is reported by the shell as 128 + 2 = 130 — which is why scripts often treat 130 as the user cancelled rather than as a failure.
What is the difference between exit codes 126 and 127?
Both come from the shell before your program ever runs: 127 means no file by that name was found on PATH, 126 means the file was found but could not be executed — usually permissions or a broken #! line.
Can a program exit with 137 without being killed?
Yes. The 128 + N band is a convention, not a reservation, so exit(137) from ordinary code produces the same number as a real SIGKILL death. When it matters, check the program's logs — a genuine kill leaves no farewell output.
Do macOS and Linux use the same signal numbers?
Mostly, not entirely. Twelve of the first fifteen numbers agree — including KILL at 9, SEGV at 11 and TERM at 15, so 137, 139 and 143 mean the same thing on both — but 7, 10 and 12 name different signals on each platform. USR1, USR2, BUS, SYS and others differ, and each platform defines a few signals the other lacks.
Should my program use the sysexits.h codes?
They are a BSD convention — EX_USAGE 64 through EX_CONFIG 78 — honoured almost nowhere outside BSD tools and some mail software. Adopt them if you want named codes for your own scripts; just do not expect other software to interpret them.
Keyboard shortcuts
- /
- Focus the code field