Conversation
RED: on Windows write_available falls back to the blocking write, so a client of a non-reading ConPTY can still park indefinitely. Refs FastLED/cli#259 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
write_available had no Windows backend, so PtySession fell back to a blocking WriteFile. Once a child stopped reading its console input the stdin pipe filled and the write parked, and nothing on the host side could release it: the same slot leak #256 fixed on Unix, still open on Windows. The ConPTY master now keeps a duplicate of the stdin pipe handle when the writer is taken. A bounded write switches that pipe end to PIPE_NOWAIT, where a byte-mode WriteFile takes only what fits, retries a full pipe every 5 ms until the deadline, and restores PIPE_WAIT before returning. Refs FastLED/cli#259 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Release on release/0.1.3 containing the Windows ConPTY bounded write, on top of v0.1.11. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
zackees
force-pushed
the
feat/conpty-bounded-write
branch
from
September 17, 2026 03:23
c83fb1c to
91171ee
Compare
The first version required 64 MiB within 30 s, which cannot tell a parked write from a pipe that conhost drains slowly. Each call now reports as it returns; a call that does not report within 10 s has parked. Refs FastLED/cli#259 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Owner
Author
|
Closing without merge. The RED this was built on did not hold up: the first test required 64 MiB in 30 s, which measures throughput, not parking. Once rewritten to bound each call, it passed identically with and without the PIPE_NOWAIT change (#297, run 35178784740; this PR, run 35178783678). The end-to-end slot-release regression in zackees/fastled-wasm also passes on Windows against v0.1.11 (FastLED/cli#260). No failing test demonstrates a Windows leak, so no fix and no v0.1.12. Findings recorded in FastLED/cli#259. |
10 tasks
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.
Refs FastLED/cli#259 (phase 3).
RED commit first: a Windows test that a bounded write returns on a ConPTY whose child is not reading. The fix follows once CI records the RED result.
🤖 Generated with Claude Code