镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix: bound stdin closure during subprocess shutdown - #152

Merged
frostming merged 1 commit into
agentclientprotocol:mainfrom
Oscar-Williams:fix-stdio-shutdown-timeout
Oct 12, 2026
Merged

frostming merged 1 commit into
agentclientprotocol:mainfrom
Oscar-Williams:fix-stdio-shutdown-timeout

Conversation

@Oscar-Williams

Copy link
Copy Markdown
Contributor

Summary

When a child stops reading stdin with buffered input pending, spawn_stdio_transport can hang before reaching its process-exit timeout. Close stdin and bound wait_closed() with shutdown_timeout, allowing the existing terminate/kill fallback to run while preserving graceful flushing.

Related issues

Applies the bounded stdin cleanup used by the Gemini example in #103 to the public transport helper.

Testing

  • Linux / Python 3.14: same real-subprocess tests fail twice on base and pass all 5 cases with the fix; covers terminate, kill, full input delivery, body exceptions and an exited child.
  • make test: 362 passed, 1 skipped (optional Gemini CLI).
  • make check and make docs-test: passed.
  • Windows / Python 3.11: 4 passed, 1 skipped in the new tests. The adjacent large-line test has an existing CRLF assertion failure on both base and head.

Docs & screenshots

Clarified timeout behavior in the function docstring. No UI or schema changes.

Checklist

  • Conventional Commit title (e.g. feat:, fix:).
  • Tests cover the change or are not required (explain above).
  • Docs/examples updated when behaviour is user-facing.
  • Schema regenerations (make gen-all) are called out if applicable.

The author set the contribution scope and validation requirements; Codex assisted with implementation and automated testing.

@frostming
frostming merged commit 439f5a4 into agentclientprotocol:main Oct 12, 2026
8 checks passed
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.

2 participants