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.