Skip to content

Support process.stdin lifecycle teardown - #3967

Merged
proggeramlug merged 4 commits into
PerryTS:mainfrom
andrewtdiz:codex/issue-3962-stdin-lifecycle
Jun 1, 2026
Merged

Support process.stdin lifecycle teardown#3967
proggeramlug merged 4 commits into
PerryTS:mainfrom
andrewtdiz:codex/issue-3962-stdin-lifecycle

Conversation

@andrewtdiz

Copy link
Copy Markdown
Contributor

Closes #3962.

Summary

  • Add HIR/codegen/runtime support for process.stdin removeListener/off and lifecycle methods pause/resume/unref/ref/destroy.
  • Track stdin listener sets, paused/refed/destroyed state, and stream flags so TUI teardown can quiesce naturally without process.exit(0).
  • Extend the readline parity fixture and focused Rust tests for listener removal, pause/resume gating, and unref/destroy liveness.

Verification

  • cargo fmt
  • cargo check
  • cargo test -p perry-stdlib readline -- --nocapture
  • cargo build --release -p perry -p perry-runtime -p perry-stdlib
  • ./run_parity_tests.sh --filter test_issue_347_readline_phase2

Note: cargo commands still emit existing workspace warnings unrelated to this change.

@proggeramlug
proggeramlug merged commit 9b72388 into PerryTS:main Jun 1, 2026
11 checks passed
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.

process.stdin: support listener removal and lifecycle detach for TUI teardown

2 participants