portable-service: run background

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2022-11-13 18:38:24 +08:00
parent 3f77b6bc64
commit 45bfb0e22e
2 changed files with 27 additions and 1 deletions

View File

@@ -476,7 +476,12 @@ pub mod client {
unsafe {
libc::memset(shmem.as_ptr() as _, 0, shmem.len() as _);
}
if crate::common::run_me(vec!["--portable-service"]).is_err() {
if crate::platform::run_background(
&std::env::current_exe()?.to_string_lossy().to_string(),
"--portable-service",
)
.is_err()
{
*SHMEM.lock().unwrap() = None;
bail!("Failed to run portable service process");
}