-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: simplify readline/stdin text #41583
Conversation
process.stdin.unref(); | ||
``` | ||
will not terminate until it receives an [EOF character][]. To exit without | ||
waiting for user input, call `process.stdin.unref()`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is removing the reference to the unref()
documentation intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes although it wasn't an easy decision. The choices were:
- Use wording that isn't straightforward simply so we can include
unref()
by itself and link that to thenet
docs. (This is what the existing text does.) - Use the simple/straightforward wording here but add a possibly-confusing link for
process.stdin.unref()
to thenet
doc description ofunref()
. - Use the simple/straightforward wording here that tells the user what they need to know, and don't bother with a link to
unref()
. At a later date, address the fact that our docs can be non-intuitive. If I findprocess.stdin.unref()
mentioned in code or a tutorial, good luck finding it in the docs. I'm not sure what the solution is, but I think we should solve it. We should not be relying on linking every mention to a surprising place.
@nodejs/documentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, although I'd also be good with removing this paragraph entirely, since it's not really related to readline per se and instead a general property of TTYs
Landed in fbfb61a |
PR-URL: #41583 Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: nodejs#41583 Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #41583 Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #41583 Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #41583 Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #41583 Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
No description provided.