FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

doc: setRawMode needs write permission on Windows by edemaine · Pull Request #63856 · nodejs/node · GitHub

/ node Public

doc: setRawMode needs write permission on Windows - #63856

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
edemaine:tty-rw
Aug 18, 2026
Merged

doc: setRawMode needs write permission on Windows#63856
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
edemaine:tty-rw

Conversation

edemaine commented Jun 11, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Fixes #63852. After reporting that issue, I realized that this is probably how Windows is supposed to work, and I just needed to open the console with better permissions. This PR documents this solution so that others can figure this out more easily.

Summary of changes

Document that tty.ReadStream#setRawMode() on Windows requires write access to the console input buffer.

When opening "\\\\.\\CONIN$" with the fs.open() family of APIs, a read-only flag such as 'r' allows creating a readable TTY stream, but setRawMode() fails because Windows needs write permission to update the console mode. Recommend using a read/write flag such as 'r+'.

nodejs-github-bot added doc Issues and PRs related to the documentations. tty Issues and PRs related to the tty subsystem. labels Jun 11, 2026
Fixes: nodejs#63852
Signed-off-by: Erik Demaine <edemaine@mit.edu>
trivikr added the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 18, 2026
nodejs-github-bot merged commit 16c06b8 into nodejs:main Aug 18, 2026
18 checks passed

Copy link
Copy Markdown
Collaborator

Landed in 16c06b8

nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 18, 2026
aduh95 pushed a commit that referenced this pull request Aug 25, 2026
Fixes: #63852
Signed-off-by: Erik Demaine <edemaine@mit.edu>
PR-URL: #63856
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
aduh95 pushed a commit that referenced this pull request Aug 25, 2026
Fixes: #63852
Signed-off-by: Erik Demaine <edemaine@mit.edu>
PR-URL: #63856
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
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

Labels

doc Issues and PRs related to the documentations. tty Issues and PRs related to the tty subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: no supported way to reopen console input (CONIN$) as a raw tty.ReadStream when stdin is a pipe

4 participants


Back | FazBrowse Home | New Git URL