Exit child processes on windows
This commit is contained in:
1 parent
eee081e2a7
commit
a7fc5853a2
1 file changed
+5
@@ -88,6 +88,11 @@ export class MCPServer {
|
|||||||
// Keep the process running
|
// Keep the process running
|
||||||
process.on('SIGINT', () => this.stop());
|
process.on('SIGINT', () => this.stop());
|
||||||
process.on('SIGTERM', () => 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());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in new issue
Block a user