Exit child processes on windows

This commit is contained in:
Colby McHenry
2026-02-11 15:15:42 -06:00
parent eee081e2a7
commit a7fc5853a2
+5
View File
@@ -88,6 +88,11 @@ export class MCPServer {
// Keep the process running
process.on('SIGINT', () => this.stop());
process.on('SIGTERM', () => this.stop());
// When the parent process (Claude Code) exits, stdin closes.
// Detect this and shut down gracefully to prevent orphaned processes.
process.stdin.on('end', () => this.stop());
process.stdin.on('close', () => this.stop());
}
/**