$RodHat_/search
exit code reference

Exit 143 SIGTERM (128 + 15)

Asked to terminate politely, and did not handle it.

Value
143
Convention
Killed by a signal (128 + N)
Signal
SIGTERM (Linux 15, FreeBSD 15)

The default signal of kill and the one a supervisor sends first. Seeing 143 means the process had no handler and died of the default action, which is usually a clean outcome after docker stop or a service restart. The trap: PID 1 in a container gets no default signal actions, so a PID 1 without a handler ignores SIGTERM, waits out the grace period and ends up as 137 instead.

What to check

docker stop name; docker inspect -f "{{.State.ExitCode}}" name

Sources

  1. Exit Status, GNU Bash manual
  2. signal(7), Linux man-pages

Exit codes are conventions, not guarantees: a program can return any value from 0 to 255. Spot one that's wrong? Tell Rod.