From 97f9ec7c19f7651b06c4cd79f875510c64b99992 Mon Sep 17 00:00:00 2001 From: Tianyi Cui <53024+tianyicui@users.noreply.github.com> Date: Sun, 19 Jul 2026 13:29:31 +0800 Subject: [PATCH] test(acp-snapshot): inherit descendant pipes portably Use Node's explicit inherit stdio mode for the fake descendant instead of passing the parent process stream objects as child descriptors. This keeps the grandchild's stdout and stderr handles open across the fake ACP parent's exit on Windows, so launcher shutdown must drain the late buffered update and stderr bytes just as it does on POSIX. --- packages/support/acp-snapshot/tests/fixtures/fake-acp-agent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/support/acp-snapshot/tests/fixtures/fake-acp-agent.ts b/packages/support/acp-snapshot/tests/fixtures/fake-acp-agent.ts index 647ffbb5d9..fbac6dfa10 100644 --- a/packages/support/acp-snapshot/tests/fixtures/fake-acp-agent.ts +++ b/packages/support/acp-snapshot/tests/fixtures/fake-acp-agent.ts @@ -267,7 +267,7 @@ function flushLogsAndExit(): void { `setTimeout(() => process.stderr.write(${JSON.stringify('late inherited stderr\n')}), 75)`, ].join(';') spawn(process.execPath, ['-e', code], { - stdio: ['ignore', process.stdout, process.stderr], + stdio: ['ignore', 'inherit', 'inherit'], }).unref() } process.exit(0)