fix: linux tray, defunct process (#12177)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2025-06-26 18:27:22 +08:00
committed by GitHub
parent fd4e0146e1
commit 9060f9ec8a

View File

@@ -21,6 +21,10 @@ pub fn start_tray() {
return; return;
} }
} }
#[cfg(target_os = "linux")]
crate::server::check_zombie();
allow_err!(make_tray()); allow_err!(make_tray());
} }
@@ -99,9 +103,11 @@ fn make_tray() -> hbb_common::ResultType<()> {
} }
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
{ {
// Do not use "xdg-open", it won't read config // Do not use "xdg-open", it won't read the config.
if crate::dbus::invoke_new_connection(crate::get_uri_prefix()).is_err() { if crate::dbus::invoke_new_connection(crate::get_uri_prefix()).is_err() {
crate::run_me::<&str>(vec![]).ok(); if let Ok(task) = crate::run_me::<&str>(vec![]) {
crate::server::CHILD_PROCESS.lock().unwrap().push(task);
}
} }
} }
}; };