Skip to content

docs: Add documentation for stdio server shutdown behavior#2237

Open
goingforstudying-ctrl wants to merge 6 commits intomodelcontextprotocol:mainfrom
goingforstudying-ctrl:docs/stdio-server-shutdown-docs
Open

docs: Add documentation for stdio server shutdown behavior#2237
goingforstudying-ctrl wants to merge 6 commits intomodelcontextprotocol:mainfrom
goingforstudying-ctrl:docs/stdio-server-shutdown-docs

Conversation

@goingforstudying-ctrl
Copy link

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

  • New file: docs/stdio_server_shutdown.md
    • Explains EOF detection mechanism
    • Documents automatic shutdown behavior
    • Includes usage example

Related

Developer 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.
@goingforstudying-ctrl goingforstudying-ctrl force-pushed the docs/stdio-server-shutdown-docs branch from 129579d to 3bd45cb Compare March 6, 2026 22:43
@goingforstudying-ctrl goingforstudying-ctrl force-pushed the docs/stdio-server-shutdown-docs branch from 3bd45cb to 37d4f77 Compare March 6, 2026 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant