doc: clarify tty raw mode applies to input processing only#63438
Open
zeeshan56656 wants to merge 1 commit into
Open
doc: clarify tty raw mode applies to input processing only#63438zeeshan56656 wants to merge 1 commit into
zeeshan56656 wants to merge 1 commit into
Conversation
Update the setRawMode documentation to specify that raw mode disables special processing of input characters only. Output processing, such as newline translation on Unix terminals, is not affected. Fixes: nodejs#63059
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
tty.ReadStream.setRawMode()documentation currently states that "all special processing of characters by the terminal is disabled", which is misleading. On Unix, raw mode (cfmakeraw/ICANON+ISIG+IEXTENcleared) only affects input character processing. Output processing flags such asOPOSTandONLCR, which perform the\nto\r\ntranslation on terminal output, are untouched bysetRawMode(true).This change scopes the existing sentence to input characters and adds a brief note clarifying that terminal output processing, including newline translation on Unix terminals, is not affected. No runtime behavior changes.
Fixes: #63059
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes (documentation only change)