Skip to content

chore: P3-41 orphan-exit check in Rust - #187

Merged
dvzrd merged 1 commit into
mainfrom
chore/orphan-exit-check-in-rust
Oct 6, 2026
Merged

dvzrd merged 1 commit into
mainfrom
chore/orphan-exit-check-in-rust

Conversation

@dvzrd

@dvzrd dvzrd commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • New bin check-orphan-exit in wiki-reader-tools replaces scripts/check-orphan-exit.py: the same nine V22 cases, CLI ([bin] [root]) and exit codes.
  • No unsafe: PTY, setsid and signals go through rustix's safe API. std only offers setsid via the unsafe pre_exec, so the bin re-executes itself in hidden --helper modes (exec, app, launcher, spawn) that call setsid then exec or spawn the reader.
  • scripts/check.sh and CI call cargo run -p wiki-reader-tools --bin check-orphan-exit; the python3 requirement is gone. Development guide and audit register updated; P3-41 marked done; dogfood-log row added.
  • Adds rustix (feature pty) to the tools crate; it is already a workspace dependency, and Cargo.lock gains one edge.

Verified (macOS)

  • Python and Rust runs against the same target/debug/wiki-reader: identical PASS set (nine cases).
  • Negative run against a stub reader that ignores the terminal: cases (i), (i'), (ii), (iii) and (iv) fail as they should; (ii') and (ii'') pass because they expect it to keep running.
  • ./scripts/check.sh all exits 0; unit test for the ps time parser.
  • Not yet verified: Linux behaviour of ptsname/setsid here; CI on ubuntu is the check.

Next

P3-38 (V23) adds an opt-in reproducer case to this harness.

🤖 Generated with Claude Code

…-reader-tools)

Replaces scripts/check-orphan-exit.py. rustix pty/setsid/signals, no unsafe: helper
modes re-execute the binary so a child can setsid before running the reader. Same
nine cases and exit codes, wired into check.sh and CI; python3 is no longer needed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@dvzrd
dvzrd merged commit f2dc3eb into main Oct 6, 2026
8 checks passed
@dvzrd
dvzrd deleted the chore/orphan-exit-check-in-rust branch October 6, 2026 21:22
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