diff --git a/sfsmcd/src/main.rs b/sfsmcd/src/main.rs index 697ad28..542f702 100644 --- a/sfsmcd/src/main.rs +++ b/sfsmcd/src/main.rs @@ -16,6 +16,8 @@ async fn main() -> Result<(), Box> { } env_logger::init(); + debug!("PID: {}, User: {}", std::process::id(), std::env::var("USER").unwrap_or("N/A".into())); + // New Crossroads instance let mut cr = Crossroads::new(); @@ -37,10 +39,10 @@ async fn main() -> Result<(), Box> { // Aquire name on D-Bus match c.request_name(DBUS_NAME, false, true, false).await { - Ok(_) => debug!("D-Bus name: {}", DBUS_NAME), + Ok(_) => info!("Listening (D-Bus) on {}", DBUS_NAME), Err(err) => { error!("Couldn't request name on D-Bus: {}", err); - return Err(err.into()); + std::process::exit(1); } }; @@ -51,7 +53,7 @@ async fn main() -> Result<(), Box> { true })); - // Will (afaik) be stabilized in Rust 1.46 + // Will (afaik) be stabilized in Rust 1.48 // core::future::pending::<()>().await; loop {}; unreachable!();