Skip to content

chore: P3-38 V23 investigated and dropped; guard the unread-master exit - #188

Merged
dvzrd merged 1 commit into
mainfrom
fix/p3-38-v23-exit-with-unread-master
Oct 6, 2026
Merged

dvzrd merged 1 commit into
mainfrom
fix/p3-38-v23-exit-with-unread-master

Conversation

@dvzrd

@dvzrd dvzrd commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Result: V23 could not be reproduced as a hang, so there is no runtime fix

The known issue said a reader exiting with an unread PTY master can sit in macOS state E and ignore SIGKILL until the master closes, with the hypothesis that the final close waits for a drain. Measured on macOS (Darwin 25.5.0, v0.1.10 debug build) with the new Rust harness and a few throwaway probes:

Scenario (master open, never read) Result
q exits within 1 s
SIGTERM exits within 1 s
forced exit (session leader killed, watchdog process::exit), screens 24x80, 120x400, 250x800, 400x1200 ?E for about 0.6 s, then gone, master still open and unread
same forced exit, master drained (control) the same 0.6 s window
tcflush(OFlush) before the forced exit no change; not shipped

So the 0.6 s E window is the ordinary exit and not a wait for a drain. The two original incidents stay unexplained.

What this PR does

  • Case (v) in check-orphan-exit (default run): master open and unread on a 120x400 screen, session leader killed, the reader must still exit. It guards the property against a future blocking flush on the exit path.
  • P3-38 -> dropped, V23 row in the register updated with the measurements, dogfood-log row, development guide "Known issues" now says none open and what to capture if it recurs (the section stays because releasing.md links to it).
  • rustix gets the termios feature in the tools crate (for the window size); no change to the shipped binary.

Decision for the operator: accept "not reproducible, dropped", or keep P3-38 open as an unexplained report.

Verified: ./scripts/check.sh all (ten PASS cases).

🤖 Generated with Claude Code

…known issue

A forced exit with the PTY master open and unread shows macOS state E for about 0.6 s and
completes, the same as with a drained master; tcflush before the forced exit changed
nothing. Case (v) of check-orphan-exit now guards that the reader exits with the master
open and unread. The development guide's known-issues list is empty.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@dvzrd
dvzrd merged commit 61c3568 into main Oct 6, 2026
8 checks passed
@dvzrd
dvzrd deleted the fix/p3-38-v23-exit-with-unread-master branch October 6, 2026 22:12
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