CodePark/ questions / Signals & process lifecycle
START PRACTICINGPRACTICE
Backend question · OS, networking & Linux › Signals & process lifecycle

A service supervisor reports that your process ended with exit code 143. What does that most likely mean?

The process was terminated by SIGTERM (128 + 15)

Exit code 143 means the process was ended by SIGTERM. Shells and most supervisors report "killed by signal n" as 128 + n. SIGTERM is signal 15, so 128 + 15 = 143.

"The process ran out of memory" is wrong: the OOM (out-of-memory) killer sends SIGKILL, which shows as 137 (128 + 9). A program could call
exit(143) on purpose. In practice, though, 143 means the process got SIGTERM and had no handler to exit in its own way.