docs: Add documentation for stdio server shutdown behavior#2237
Open
goingforstudying-ctrl wants to merge 6 commits intomodelcontextprotocol:mainfrom
Open
docs: Add documentation for stdio server shutdown behavior#2237goingforstudying-ctrl wants to merge 6 commits intomodelcontextprotocol:mainfrom
goingforstudying-ctrl wants to merge 6 commits intomodelcontextprotocol:mainfrom
Conversation
added 4 commits
March 6, 2026 14:37
When the parent process dies or stdin is closed, the stdio server now properly detects EOF and shuts down gracefully instead of becoming an orphan process. Changes: - Explicitly close read_stream_writer on EOF to signal shutdown - Add test coverage for EOF handling and parent death simulation Fixes modelcontextprotocol#2231
Documents how the stdio server detects parent process termination via stdin EOF and shuts down gracefully to prevent orphan processes.
129579d to
3bd45cb
Compare
3bd45cb to
37d4f77
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds documentation explaining how the stdio server handles parent process
termination and prevents orphan processes.
Background
Related to the fix for #2231 (stdio server process survives parent death).
This documentation helps users understand the graceful shutdown mechanism.
Changes
docs/stdio_server_shutdown.mdRelated