From b4759401ee26bfb78b9ae99a3afcc5276314f4ac Mon Sep 17 00:00:00 2001 From: zmdyy0318 Date: Fri, 23 Oct 2026 21:19:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E5=81=9C=E6=AD=A2=E6=97=B6=E7=BB=88?= =?UTF-8?q?=E6=AD=A2=20pretask=20=E5=AD=90=E8=BF=9B=E7=A8=8B=EF=BC=8C?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E5=85=B6=E5=9C=A8=E5=90=8E=E5=8F=B0=E7=BB=A7?= =?UTF-8?q?=E7=BB=AD=E8=BF=90=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/commands/system.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src-tauri/src/commands/system.rs b/src-tauri/src/commands/system.rs index 48f404d1..68f034a4 100644 --- a/src-tauri/src/commands/system.rs +++ b/src-tauri/src/commands/system.rs @@ -755,6 +755,10 @@ pub async fn run_pretask( "run_pretask wait cancelled by stop request: {}", instance_id ); + // pretask 由项目声明、受 MXU 管理,与前置程序不同,停止时直接终止,避免其在后台继续操作 + if let Err(e) = child.kill() { + warn!("Failed to kill pretask {}: {}", program, e); + } std::thread::spawn(move || { let _ = child.wait(); }); From b644401ed99e212e33d6a6816ed426bc1236b445 Mon Sep 17 00:00:00 2001 From: zmdyy0318 Date: Fri, 23 Oct 2026 21:30:48 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E9=9D=9E=20Windows=20=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E4=B9=9F=E5=AF=BC=E5=85=A5=20log::warn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/commands/system.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src-tauri/src/commands/system.rs b/src-tauri/src/commands/system.rs index 68f034a4..0fea966b 100644 --- a/src-tauri/src/commands/system.rs +++ b/src-tauri/src/commands/system.rs @@ -9,7 +9,6 @@ use super::types::WebView2DirInfo; use super::utils::get_maafw_dir; use clap::Parser; use log::info; -#[cfg(windows)] use log::warn; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc;