diff --git a/src/tray.rs b/src/tray.rs index 98ce450e1..f36da2cec 100644 --- a/src/tray.rs +++ b/src/tray.rs @@ -21,6 +21,10 @@ pub fn start_tray() { return; } } + + #[cfg(target_os = "linux")] + crate::server::check_zombie(); + allow_err!(make_tray()); } @@ -99,9 +103,11 @@ fn make_tray() -> hbb_common::ResultType<()> { } #[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() { - crate::run_me::<&str>(vec![]).ok(); + if let Ok(task) = crate::run_me::<&str>(vec![]) { + crate::server::CHILD_PROCESS.lock().unwrap().push(task); + } } } };