You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(server): add host process watchdog to StdioServerTransport
When clientProcessId is provided, the transport periodically checks if
the host process is still alive using signal 0 and self-terminates if
it is gone. This prevents orphaned server processes when the host
crashes or is killed without cleanly shutting down the server.
Follows the pattern used by vscode-languageserver-node as described
in the issue.
Addresses review feedback:
- Rebased onto main (integrates _closed guard, _onstdouterror, new send())
- Treat EPERM as process-still-alive in watchdog catch block
- Add kill() stub to shimsWorkerd.ts for workerd compatibility
- Export StdioServerTransportOptions from packages/server/src/index.ts
Fixes#208
Co-Authored-By: windro-xdd <windro-xdd@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add host process watchdog to StdioServerTransport. When `clientProcessId` is provided via the new options object constructor, the transport periodically checks if the host process is still alive and self-terminates if it is gone, preventing orphaned server processes.
0 commit comments