Better error message for PID file creation failure ()

Reviewed-on: 
This commit is contained in:
Karcsesz 2025-02-23 21:02:36 +01:00
commit fdfc103554

View file

@ -34,7 +34,14 @@ pub fn init(data_paths: DataPaths, server_parameters: ServerParameters) {
}
info!("Found PID file at {pid_file_path:?}, overwriting...");
}
let pid_file = qpidfile::Pidfile::new(pid_file_path).unwrap();
let pid_file = match qpidfile::Pidfile::new(&pid_file_path) {
Ok(pidfile) => pidfile,
Err(e) => {
error!("Failed to create PID file at {}", pid_file_path.display());
error!("{}", e);
return;
}
};
let runtime = match tokio::runtime::Runtime::new() {
Err(e) => {