Repository navigation
Conversation
This was referenced Oct 27, 2026
jlongster
force-pushed
the
daemon-subscription-poll
branch
from
October 27, 2026 19:55
3a2ce2d to
a51d51c
Compare
jlongster
force-pushed
the
daemon-handler-spawn
branch
from
October 27, 2026 19:55
ffc9c85 to
49f2388
Compare
jlongster
force-pushed
the
daemon-subscription-poll
branch
from
October 27, 2026 20:07
a51d51c to
d00c1a5
Compare
jlongster
force-pushed
the
daemon-handler-spawn
branch
from
October 27, 2026 20:07
49f2388 to
6b21f80
Compare
jlongster
force-pushed
the
daemon-handler-spawn
branch
from
October 27, 2026 22:21
6b21f80 to
6fac8bd
Compare
Contributor
Author
|
Closing: we're accepting that thread::spawn panics on thread-creation failure; this was too much change for that edge case. #59700 now builds directly on dev. |
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.
Ported from anomalyco/opencode-pty#29. Part 2 of the stack for anomalyco/opencode-pty#25. Part 1 (#59698) is merged.
Issue for this PR
Related to anomalyco/opencode-pty#25
Type of change
What does this PR do?
thread::spawnpanics when the OS can't create a thread. In the daemon that panic skipped orderly shutdown and cleanup, or failed in confusing ways. I found this while planning the readiness-driven loop. All daemon threads now start throughthread::Builder, are namedopencode-pty-*, and handle spawn failure explicitly:packages/process-daemon/src/service.rsnow cleans up fully after any partial failure. It kills and reaps the child, and joins any threads that already started through the existingTerminalHandle::shutdownpath. The child is handed to the waiter only once the waiter is running.ClosePseudoConsolecould hang on older Windows.ClosePseudoConsolecan still block on older Windows when the child has already written more than the pipe buffer holds. Fixing that means starting the reader before spawning the child, which is deliberately out of scope here.The commit applied to the monorepo unchanged (identical patch ID to the opencode-pty commit).
How did you verify your code works?
packages/process-daemon):cargo fmt --check,cargo clippy --locked --all-targets --all-features -- -D warnings, andcargo test --locked --lib(40 passed) pass.daemon-windows-poll) the full macOS CI test selection and Windows/Linux cross clippy also pass.cargo test --locked --lib --test service --test runtime --test ownership --test rows --test ghostty-effects(lib 40, ghostty-effects 5, ownership 8, rows 1, runtime 8 + 1 ignored, service 9). Native Windows relies on CI.Screenshots / recordings
N/A, internal daemon change.
Checklist