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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user