Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Process Exit Codes, Signals, and Process Lifecycle

This part is a source-backed, cross-referenced reference covering how Linux processes terminate, how statuses are reported, and how signals behave across shells, service managers, containers, and eight programming-language runtimes. Every chapter separates standards guarantees (POSIX.1-2017, ISO C/C++) from Linux implementation behavior (kernel, glibc), runtime implementation behavior, and mere conventions — and cites the primary source that supports each claim. Coverage is tracked requirement-by-requirement in the unified coverage ledger, which assigns stable IDs to every signal, interface, shell, service manager, container topic, and language requirement in scope.

Chapter map

SectionChaptersLedger IDs
Signals — Deep ReferenceStandard signals (all 31, per-architecture numbering) · Real-time signals (queuing, ordering, limits)SIG-001 – SIG-040
Signal interfaceskill/raise · sigaction/signal · masks (sigprocmask/pthread_sigmask/sigpending) · sigwait/sigsuspend · signalfd/pidfd_send_signal · tgkill · rt_sig* ABI · async-signal-safetyIF-001 – IF-018
Exit-status lifecycleLifecycle (exit/_exit/wait family, status encoding, zombies) · Conventions (common values, guarantees vs conventions)EX-001 – EX-012
Shell behaviorBash · Dash · Zsh · Portability matrixSH-001 – SH-012
Service managerssystemd · OpenRC · runit · s6 · comparisonSM-001 – SM-012
Containers & orchestrationPID 1 & entrypoints · Docker · Kubernetes · scenariosCT-001 – CT-011
Language chaptersC · C++ · Python · Go · Java · Rust · Node.js · OCaml · Cross-language comparisonLG-* · XC-001 – XC-009
Operational troubleshootingCommon status values · Decision treeTR-001 – TR-009

Scope statement

  • Signal numbering is verified per architecture from the Linux kernel UAPI headers (include/uapi/asm-generic/signal.h plus per-arch overrides) and signal(7); the inventory names the architectures it covers and claims no completeness beyond them.
  • Interfaces are documented from Linux man-pages, POSIX.1-2017, and the glibc documentation, with kernel-syscall / libc-wrapper / shell-builtin / utility layering kept explicit.
  • Shells covered: Bash, Dash, Zsh (version claims stated per manual).
  • Service managers covered: systemd, OpenRC, runit, s6 — from official project documentation.
  • Containers: Docker-compatible runtimes and Kubernetes, from official runtime/orchestrator docs.
  • Languages covered: C, C++, Python, Go, Java, Rust, Node.js, OCaml — each chapter declares its documentation version scope and carries its own end-of-chapter coverage ledger with per-API statuses, including honestly marked source-limited rows.