Skip to main content

run_daemon

Function run_daemon 

Source
pub async fn run_daemon(sock_path: &Path, pid_path: &Path) -> i32
Expand description

Run the daemon’s accept loop and grace-period shutdown logic.

Binds a Unix domain socket at sock_path, accepts client connections, and monitors for shutdown conditions (signal or grace-period expiry). Returns 0 on clean shutdown, 1 on error.