Skip to content

fix(stdio): implement graceful shutdown as per spec #821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Skn0tt
Copy link
Contributor

@Skn0tt Skn0tt commented Jul 29, 2025

Motivation and Context

Implements graceful shutdown for StdioClientTransport as per spec. The current behaviour is to send SIGTERM and forget about the process, which isn't graceful and can lead to processes hanging around unintentionally.

How Has This Been Tested?

I added a unit test.

Breaking Changes

These changes are breaking existing behaviour, but they align with the spec:

  • close() waits for proper shutdown
  • Processes that don't handle SIGTERM are now killed forcefully

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@Skn0tt Skn0tt requested a review from a team as a code owner July 29, 2025 14:02
@Skn0tt Skn0tt requested a review from ihrpr July 29, 2025 14:02
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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy