fix: reduce Windows console popups in web backend
Prefer graceful process termination before taskkill fallback Force ConPTY for Windows terminal sessions to avoid console flashes Keep git and server process operations running without visible command windows
This commit is contained in:
@@ -1821,6 +1821,15 @@ async function terminateProcessTree(pid, options = {}) {
|
||||
: 3000;
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
try {
|
||||
process.kill(pid);
|
||||
} catch {
|
||||
}
|
||||
|
||||
if (await waitForProcessExit(pid, 800)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
try {
|
||||
spawnSync('taskkill', ['/pid', String(pid), '/t'], {
|
||||
stdio: 'ignore',
|
||||
|
||||
Reference in New Issue
Block a user