Shell Exit Status Decoder
Read a shell exit code such as 139, or a raw wait status such as 0x008b, as the exit code, fatal signal and core-dump flag it holds.
Signals 1–31 and the shell code they become
waitpid returns one integer: the exit code sits in the high byte, the signal in the low seven bits, and bit 7 marks a core dump, so a SIGSEGV with a core is 0x008b. A shell keeps only eight bits and reports 128 + n for a fatal signal, which is why the same 139 reads as “died from SIGSEGV” or as an ordinary exit(139). Signals 32 and 33 are reserved by the C library; 34 to 64 are the real-time signals. Everything is decoded in this page: nothing is run, stored or sent anywhere. Only 0x7f and 0xffff are special statuses — a stopped child and a continued one.