liveBook · Manning

Exit code

An exit code is a numeric status returned by a process when it terminates to indicate the outcome of its execution.

How 2 Manning books explain it

Tiny Python Projects: Learn coding and testing with puzzles and games

An error code is a numeric process exit status indicating that a program terminated because an error occurred.

How it is used
Coordinates command-line error reporting, validation, testing, shell redirection, and pipeline control.
How deep it goes
Explains zero versus nonzero statuses, sys.exit() forms, STDERR routing, validation branches, and status assertions, but not operating-system status internals.
Examples
Demonstrates invalid arguments, missing placeholders, STDERR redirection, explicit sys.exit(1), string-based sys.exit(), and nonzero-status tests.
What you can do after
Apply it via Python's sys.exit() and argparse to report failures, separate diagnostics, stop pipelines, and test error behavior.

Read how Tiny Python Projects: Learn coding and testing with puzzles and games explains exit code →

Kubernetes in Action, Second Edition

An exit code is a numeric result returned by a process when it terminates, conventionally indicating success or failure.

How it is used
Uses process results to evaluate container health and interpret container termination during Kubernetes lifecycle operations.
How deep it goes
Explains zero, non-zero, 128+n, 137, and 143 codes, then applies them to probes, restarts, signals, and logs.
Examples
Demonstrates exit code 0 after graceful termination, code 137 after killing, and command results from an exec liveness probe.
What you can do after
Diagnose/debug with it by inspecting pod status, interpreting termination codes, and retrieving logs from the previous container.

Read how Kubernetes in Action, Second Edition explains exit code →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.