refactor: start settings daemon first

This commit is contained in:
Ashley Wulber 2024-01-16 14:30:28 -05:00 committed by Ashley Wulber
parent 8fd40b588a
commit 334aebc398

View file

@ -17,7 +17,7 @@ use async_signals::Signals;
use color_eyre::{eyre::WrapErr, Result};
use comp::create_privileged_socket;
use cosmic_notifications_util::{DAEMON_NOTIFICATIONS_FD, PANEL_NOTIFICATIONS_FD};
use futures_util::{SinkExt, StreamExt};
use futures_util::StreamExt;
use launch_pad::{process::Process, ProcessManager};
use service::SessionRequest;
use tokio::{
@ -119,6 +119,11 @@ async fn start(
systemd::stop_systemd_target();
}
process_manager
.start(Process::new().with_executable("cosmic-settings-daemon"))
.await
.expect("failed to start settings daemon");
let env_vars = env_rx
.await
.expect("failed to receive environmental variables")
@ -262,11 +267,6 @@ async fn start(
)
.await;
process_manager
.start(Process::new().with_executable("cosmic-settings-daemon"))
.await
.expect("failed to start settings daemon");
let mut signals = Signals::new(vec![libc::SIGTERM, libc::SIGINT]).unwrap();
let mut status = Status::Exited;
loop {