From d64b393145f0e7d8ddb9a4f64fea64c74947adbc Mon Sep 17 00:00:00 2001 From: pulsareonbot Date: Tue, 7 Jul 2026 13:39:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(Live2D):=20pkill=20firefox-esr=20=E6=9D=80?= =?UTF-8?q?=E6=95=B4=E4=B8=AA=E8=BF=9B=E7=A8=8B=E6=A0=91=EF=BC=88=E5=90=AB?= =?UTF-8?q?=20contentproc=20=E5=AD=90=E8=BF=9B=E7=A8=8B=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/video/mod.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/video/mod.rs b/src/plugins/video/mod.rs index 0bab18f..cfde436 100644 --- a/src/plugins/video/mod.rs +++ b/src/plugins/video/mod.rs @@ -214,9 +214,10 @@ impl Plugin for VideoPlugin { let _ = child.kill(); let _ = child.wait(); } + // Firefox 会 fork 多个子进程,child.kill() 只杀父进程,用 pkill 兜底 let _ = std::process::Command::new("pkill") .arg("-f") - .arg("live2d-display.html") + .arg("firefox-esr") .output(); // 启动 Firefox kiosk 模式全屏显示 Live2D let port = config.remote_control.port; @@ -247,10 +248,10 @@ impl Plugin for VideoPlugin { let _ = child.kill(); let _ = child.wait(); } - // Firefox 会 fork 子进程,child.kill() 只杀父进程,用 pkill 兜底 + // Firefox 会 fork 多个子进程,child.kill() 只杀父进程,用 pkill 兜底 let _ = std::process::Command::new("pkill") .arg("-f") - .arg("live2d-display.html") + .arg("firefox-esr") .output(); println!("[VideoPlugin] 切回视频模式:Firefox kiosk 已关闭"); @@ -306,7 +307,7 @@ impl Plugin for VideoPlugin { } let _ = std::process::Command::new("pkill") .arg("-f") - .arg("live2d-display.html") + .arg("firefox-esr") .output(); self.publish_status();