fix: linux tray, defunct process (#12177)
Some checks are pending
CI / ${{ matrix.job.target }} (${{ matrix.job.os }}) (map[os:ubuntu-22.04 target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Full Flutter CI / run-ci (push) Waiting to run

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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);
}
}
}
};