process supervisor
A program that starts processes, watches them and restarts them if they exit, such as systemd or a container platform.
In more detail
A supervisor can only manage a process that stays in the foreground. With a supervisor in place, letting a broken process crash and restart cleanly is safer than trying to keep it alive. Process management belongs to the operating system or the platform, not to the app.
Example
On most Linux systems systemd is the supervisor. It records each service's state, restarts it on failure and captures its output in the journal. Long-lived work belongs under an intentional supervisor rather than in a background shell job.Related terms
- foreground process — A process that keeps running as the one its launcher started, instead of detaching into the background.
- restart policy — A setting that tells Docker or Kubernetes whether to start a container again automatically after it exits.
- daemonize — To make a program detach itself and keep running in the background, traditionally by forking and exiting the original process.
- systemd — The program that starts and supervises background services on most Linux distributions.
- Restart= — The systemd service setting that decides when systemd restarts a process that exits, such as on-failure or always.
- nohup — A command that runs another command immune to the hangup signal, so it keeps running after you log out.
- background job — A command started with & at the end of the line, which runs while the shell immediately gives you the prompt back.
- Kubernetes — An open-source system that runs and manages containers across a cluster of machines.
Taught in
- Port Binding And Concurrency — DevOps & Site Reliability Engineering
- Job Control, And Processes That Outlive You — Linux Fundamentals & Systems Administration
- Your Own Unit, And Reading journald — Linux Fundamentals & Systems Administration
- The Diagnostic Ladder: Is It Up, Is It Named, Is It Routed — Linux Fundamentals & Systems Administration
- Global Error Trapping: uncaughtException & Exits — Node.js Internals & Backend Services