Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src-tauri/src/commands/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -755,6 +754,10 @@ pub async fn run_pretask(
"run_pretask wait cancelled by stop request: {}",
instance_id
);
// pretask 由项目声明、受 MXU 管理,与前置程序不同,停止时直接终止,避免其在后台继续操作
if let Err(e) = child.kill() {
Comment thread
zmdyy0318 marked this conversation as resolved.
warn!("Failed to kill pretask {}: {}", program, e);
Comment thread
sourcery-ai[bot] marked this conversation as resolved.
Comment thread
zmdyy0318 marked this conversation as resolved.
}
std::thread::spawn(move || {
let _ = child.wait();
});
Expand Down
Loading