Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

fix: stop child process on window

Vanalite797b8d1dc42c
diff --git a/src-tauri/src/core/openclaw/sandbox_direct.rs b/src-tauri/src/core/openclaw/sandbox_direct.rs
index a8b86be83..9737364be 100644
--- a/src-tauri/src/core/openclaw/sandbox_direct.rs
+++ b/src-tauri/src/core/openclaw/sandbox_direct.rs
@@ -118,7 +118,12 @@ impl Sandbox for DirectProcessSandbox {
}
}
- async fn stop(&self, _handle: &mut SandboxHandle) -> Result<(), String> {
+ async fn stop(&self, handle: &mut SandboxHandle) -> Result<(), String> {
+ if let SandboxHandle::Process(child) = handle {
+ let _ = child.kill().await;
+ return Ok(());
+ }
+
let mut stopped_via_cli = false;
let config_dir = super::get_openclaw_config_dir().unwrap_or_else(|_| std::path::PathBuf::from("."));
let mut stop_cmd = build_openclaw_command(&["gateway", "stop"], &config_dir);