From 979ecfba60388f82a285209e2d8509337c7a09ac Mon Sep 17 00:00:00 2001 From: SK Akram Date: Tue, 23 Dec 2025 05:54:11 +0000 Subject: [PATCH] fix: increase SIGKILL timeout from 200ms to 5s for graceful shutdown --- packages/core/src/services/shellExecutionService.test.ts | 2 +- packages/core/src/services/shellExecutionService.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/services/shellExecutionService.test.ts b/packages/core/src/services/shellExecutionService.test.ts index 7f3ac78..b4347bb 100644 --- a/packages/core/src/services/shellExecutionService.test.ts +++ b/packages/core/src/services/shellExecutionService.test.ts @@ -537,7 +537,7 @@ describe('ShellExecutionService child_process fallback', () => { ); // Now, advance time past the timeout - await vi.advanceTimersByTimeAsync(250); + await vi.advanceTimersByTimeAsync(5050); // Check the second kill signal expect(mockProcessKill).toHaveBeenCalledWith( diff --git a/packages/core/src/services/shellExecutionService.ts b/packages/core/src/services/shellExecutionService.ts index a0d7136..0bace38 100644 --- a/packages/core/src/services/shellExecutionService.ts +++ b/packages/core/src/services/shellExecutionService.ts @@ -15,7 +15,7 @@ import { getCachedEncodingForBuffer } from '../utils/systemEncoding.js'; import { isBinary } from '../utils/textUtils.js'; const { Terminal } = pkg; -const SIGKILL_TIMEOUT_MS = 200; +const SIGKILL_TIMEOUT_MS = 5000; // @ts-expect-error getFullText is not a public API. const getFullText = (terminal: Terminal) => {