Exit child processes on windows
This commit is contained in:
@@ -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