Process manager: definition and meaning

A process manager starts programs, tracks them, captures their output, and decides what happens when they exit: restart, stay stopped, or report the failure. Many run in the background, so a server keeps going without an open terminal tab.

Updated

A process manager is a program whose job is to run other programs. It starts each one as a child process, records its process ID, collects what it writes to standard output and standard error, and decides what happens when the process exits: restart it, leave it stopped, or give up and report the failure.

What it does

The core duties are small and the same everywhere.

  • Start a command with a chosen working directory and environment.
  • Track the process ID and whether the process is still alive.
  • Capture output, so you can read it later without keeping a terminal open.
  • Stop the process on request. A common sequence, used by systemd and Supervisor, is to send SIGTERM, wait for a timeout, and send SIGKILL if the process is still running. A process cannot catch or ignore SIGKILL.
  • Restart it according to a policy. PM2, for example, can wait longer between attempts with its --exp-backoff-restart-delay option.

Operating systems ship their own versions: systemd on Linux and launchd on macOS run background services, and launchd can keep a job running with its KeepAlive setting. Application-level tools such as PM2 and Supervisor do the same job for the programs of one project or one host. Procfile runners such as Foreman start every process type listed in a Procfile together.

The smallest version

This shell loop is a process manager with one rule: restart after a failure, at most five times.

Terminal
restarts=0
until node server.js; do
  restarts=$((restarts + 1))
  [ "$restarts" -gt 5 ] && break
  echo "exited, restart $restarts of 5" >&2
  sleep 2
done

It shows why real tools exist. The loop keeps no logs, does not forward a SIGTERM sent to the shell on to the child, waits a fixed two seconds every time, and cannot tell a server that is running from one that is stuck. It also runs in the foreground of the terminal you start it in.

A common confusion

A process manager is not a task runner or a process viewer. A task runner, such as an npm script, runs a command once and finishes when the command does. It does not restart the command or keep its logs. A viewer, such as top, lists processes but does not own them. A process manager is the parent of the processes it runs, so it can wait for each child to exit, collect its exit status, and act on that. It is also not a container orchestrator, such as Kubernetes, which places containers onto the machines of a cluster.

In Rig

Rig is a process manager for local dev servers. It starts the script you pick for a project, and the scripts it detects include package.json scripts, Procfile process types, docker compose up, and Artisan sidecars such as a queue worker.

  • Procfile: each process type in a Procfile becomes a script you can pick. Rig runs the command with /bin/sh -c, or with cmd.exe /d /s /c on Windows.
  • Ports: if a project has a port set, Rig appends --port N to a Procfile command and exports PORT, VITE_PORT, HOST_PORT, and npm_config_port.
  • Environment: variables come from the project’s active env profile.
  • Extra scripts: other scripts can run alongside the main one.
  • Agents: coding agents can start and stop projects and read logs through Rig’s MCP tools, depending on the access mode, and any write waits for an Approve click in Rig.

Sources

  1. systemd.service: service unit configurationOfficial documentation, checked 13 October 2026
  2. systemd.kill: process killing procedure configurationOfficial documentation, checked 13 October 2026
  3. Creating Launch Daemons and Agents (Apple)Official documentation, checked 13 October 2026
  4. Supervisor configuration file referenceOfficial documentation, checked 13 October 2026
  5. PM2 restart strategiesOfficial documentation, checked 13 October 2026
  6. foreman(1): manage Procfile-based applicationsOfficial documentation, checked 13 October 2026
  7. signal(2) Linux manual pageOfficial documentation, checked 13 October 2026
  8. sigaction(3p) Linux manual pageOfficial documentation, checked 13 October 2026
  9. Kubernetes overviewOfficial documentation, checked 13 October 2026
  10. Rig documentation: Procfile projects (script detection confirmed in Rig’s source code)Rig source code, checked 13 October 2026

See how Rig fits in

Rig is a Mac app that starts, stops, and watches the processes in a project from one window. The knowledge base explains each part in plain language.

Related

https://userig.app/glossary/process-manager