Skip to main content

stop_daemon

Function stop_daemon 

Source
pub async fn stop_daemon() -> Result<Option<i32>, Box<dyn Error + Send + Sync>>
Expand description

Stop the running daemon: send SIGTERM and wait for the process to fully exit (so its shutdown cleanup of the socket and pid files completes). Returns Ok(Some(pid)) if a daemon was stopped, Ok(None) if no daemon is running.