close the PTY master fd when the child exits naturally (T-360)
_reap() flipped _dead without releasing the master fd, and close() short-circuits on _dead — so every naturally-exited child leaked its fd and pty device for the life of the app. The reader isolate sends EOF only after leaving its poll loop, so releasing the fd inside _reap() cannot race the reader. Regression test counts /dev/ptmx entries in /proc/self/fd across a natural exit; verified to fail against the unfixed code. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,6 +32,10 @@ heading, and (b) bumping `pubspec.yaml` `version:` in the same commit.
|
||||
|
||||
### Fixed
|
||||
|
||||
- **PTY master fd no longer leaks when a child exits on its own.** Every
|
||||
terminal or Claude pane whose process ended naturally left its pty device
|
||||
open for the life of the app; natural exit now releases the fd. (T-360)
|
||||
|
||||
- **Accepting ExitPlanMode now leaves plan mode in the conversation panel.**
|
||||
Approving Claude's plan (the ExitPlanMode tool) transitioned the underlying
|
||||
session out of plan mode, but clide's tracked permission mode didn't follow,
|
||||
|
||||
Reference in New Issue
Block a user