From b68e2f2d1c2b0f0f2c27f16aea21121b0c0199ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=98=89=E4=BC=9F?= <202383014@uibe.edu.cn> Date: Wed, 23 Sep 2026 13:05:04 +0800 Subject: [PATCH] fix(background-terminals): extend Windows taskkill force window --- extensions/background-terminals/src/manager.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/background-terminals/src/manager.ts b/extensions/background-terminals/src/manager.ts index 9095a560..fa43e83a 100644 --- a/extensions/background-terminals/src/manager.ts +++ b/extensions/background-terminals/src/manager.ts @@ -46,8 +46,9 @@ export const MAX_SPILL_BYTES_PER_STREAM = 256 * 1024 * 1024; export const MAX_SPILL_BYTES_PER_SESSION = 512 * 1024 * 1024; const STOP_TIMEOUT_MS = 5_000; /** SIGTERM is normally enough; the second deadline covers a wedged process. */ -const FORCE_KILL_AFTER_MS = 2_000; -const FORCE_CLOSE_WAIT_MS = 500; +// Reserve more of the same 2.5s termination budget for Windows taskkill /T /F. +const FORCE_KILL_AFTER_MS = process.platform === "win32" ? 1_500 : 2_000; +const FORCE_CLOSE_WAIT_MS = process.platform === "win32" ? 1_000 : 500; /** Reserve this inside each existing termination phase for helper closure. */ const TASKKILL_HELPER_CLOSE_WAIT_MS = 100; /** After termination, how long to wait for the natural close→flush→settle