fix(test): nested Bun child should use --autokill flag

The nested child Bun process should also use --autokill to properly test
the nested autokill behavior. This ensures both the parent and child Bun
processes will kill their children when exiting.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude Bot
2025-10-07 07:11:13 +00:00
parent e0e6ac6a92
commit 9961acf579

View File

@@ -632,15 +632,15 @@ describe.skipIf(isWindows)("--autokill", () => {
"nested_parent.js": `
const { spawn } = require('child_process');
// Spawn a nested Bun process that spawns its own children
// Spawn a nested Bun process with --autokill that spawns its own children
const bunExe = process.argv[0];
const childBun = spawn(bunExe, ['nested_child.js'], {
const childBun = spawn(bunExe, ['--autokill', 'nested_child.js'], {
cwd: __dirname
});
console.log('parent-bun-pid:', childBun.pid);
// Exit after a delay, triggering autokill
// Exit after a delay, triggering autokill on parent and nested child
setTimeout(() => process.exit(0), 200);
`,
});