Skip to main content

Module process

Module process 

Source
Expand description

zot process lifecycle: spawn, liveness check, and graceful stop.

Ported from internal/registrycache/process.go.

Enums§

ProcessError
Errors from spawning or controlling the zot process.

Functions§

is_running
Returns true when the PID file exists and the named process is alive. Missing PID file or stale PID both yield false.
spawn_process
Spawns zot in the background, writes the PID file, and returns. The caller does not wait for zot; zot survives as a detached child (own session via setsid). stdout and stderr are redirected to paths::log_path.
stop_process
Sends SIGTERM to the zot process, waits up to STOP_TIMEOUT for it to exit, escalates to SIGKILL if needed, then removes the PID file. No-op when zot isn’t running. Idempotent.