Skip to main content

Module daemon

Module daemon 

Source
Expand description

Daemon supervisor for component lifecycle management.

Structs§

ComponentHandle
DaemonSupervisor
PidGuard
Exclusive, flock(2)-backed guard on the daemon’s pid file.

Enums§

ComponentStatus
DaemonError
Error type for daemon component task failures and pid file guard acquisition.

Functions§

is_process_alive
Check whether a process with the given PID is currently alive.
read_pid_file
Read the PID from a PID file.
remove_pid_file
Remove the PID file.
write_pid_file
Write a PID file atomically using O_CREAT | O_EXCL to prevent TOCTOU races.