Skip to main content

Module pidfile

Module pidfile 

Source
Expand description

Pidfile primitives and process-liveness checks for the daemon supervisor.

The pidfile is an atomic single-writer lock. acquire uses O_CREAT|O_EXCL so two concurrent daemons racing for the same upstream cannot both win. The caller is responsible for preflight: if a stale pidfile exists for a dead PID, it must be removed before acquire is called.

Structs§

Pidfile

Functions§

process_alive
Returns true if a process with this PID is running and visible to us.
process_name
Returns the executable name for the PID if it can be determined cheaply.