Compare commits

...

2 Commits

Author SHA1 Message Date
Eric Traut
9bdfac2627 Merge branch 'main' into etraut/silence-windows-taskkill 2026-05-08 00:24:14 -07:00
Eric Traut
4a82dc524f Silence Windows taskkill during MCP cleanup 2026-05-08 00:23:02 -07:00

View File

@@ -15,6 +15,8 @@ use std::collections::HashMap;
use std::ffi::OsString;
use std::future::Future;
use std::io;
#[cfg(windows)]
use std::os::windows::process::CommandExt;
use std::path::PathBuf;
use std::process::Stdio;
use std::sync::Arc;
@@ -197,6 +199,9 @@ impl StdioServerLauncher for LocalStdioServerLauncher {
#[cfg(unix)]
const PROCESS_GROUP_TERM_GRACE_PERIOD: Duration = Duration::from_secs(2);
#[cfg(windows)]
const CREATE_NO_WINDOW: u32 = 0x08000000;
#[cfg(unix)]
struct LocalProcessTerminator {
process_group_id: u32,
@@ -341,6 +346,10 @@ impl LocalProcessTerminator {
.arg(self.pid.to_string())
.arg("/T")
.arg("/F")
.stdin(Stdio::null())
.stdout(Stdio::null())
.stderr(Stdio::null())
.creation_flags(CREATE_NO_WINDOW)
.status();
}