Skip to content

readline: add stricter validation for functions called after closed - #57680

Closed
dario-piotrowicz wants to merge 12 commits into
nodejs:mainfrom
dario-piotrowicz:dario/readline-after-close-checks
Closed

dario-piotrowicz wants to merge 12 commits into
nodejs:mainfrom
dario-piotrowicz:dario/readline-after-close-checks

Conversation

@dario-piotrowicz

@dario-piotrowicz dario-piotrowicz commented Mar 29, 2025 •

Copy link
Copy Markdown
Member

Fixes #57678

This PR makes it so that calling pause(), resume() or write() on a closed readline interface results in ERR_USE_AFTER_CLOSE errors being thrown (following the same behavior as question())

Note

I'm slightly concerned regarding the tests I needed to update, as those might indicate that the stricted
readline checks might have some potential unwanted implications, if the changes here were to land it might be
safer to add them as a semver major I think 🤔

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. needs-citgm PRs that need a CITGM CI run. readline Issues and PRs related to the built-in readline module. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

readline hangs on writes after close

9 participants