Add getpass to libc build - #27605
Merged
Merged
Conversation
sbc100
force-pushed
the
getpass-noderawfs
branch
from
August 24, 2026 21:23
b1b8124 to
4352afd
Compare
getpass to libc buildgetpass to libc build
sbc100
force-pushed
the
getpass-noderawfs
branch
from
August 24, 2026 21:37
4352afd to
a43242b
Compare
sbc100
force-pushed
the
getpass-noderawfs
branch
2 times, most recently
from
August 24, 2026 22:56
52ec517 to
b7d479c
Compare
getpass to libc buildgetpass to libc build
getpass to libc buildgetpass to libc build
kripken
reviewed
Aug 25, 2026
Member
|
This is deprecated in libc - is it worth supporting? |
Collaborator
Author
Well, we were asked to at least stub it out in #27583, plus the related fixes here are actually useful/good. Compiling it in doesn't really have any cost here I think. |
sbc100
force-pushed
the
getpass-noderawfs
branch
from
August 25, 2026 18:46
b7d479c to
aa81368
Compare
Include `getpass.c` in libc and ensure `getpass()` works correctly at least under Node.js. This includes two bugfixes needed to make `getpass()` work: 1. In `libtty.js`: In canonical mode (`ICANON`), make `read` return as soon as a newline character (`\n`) is encountered. 2. In `libnoderawfs.js`: Properly mark TTY streams as non-seekable when opened via `FS.open`, and remove hardcoded `seekable: false` from standard stream creation. See: emscripten-core#27583
sbc100
force-pushed
the
getpass-noderawfs
branch
from
August 25, 2026 18:47
aa81368 to
959d0ee
Compare
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.
Include
getpass.cin libc and ensuregetpass()works correctlyat least under Node.js.
This includes two bugfixes needed to make
getpass()work:libtty.js: In canonical mode (ICANON), makereadreturn assoon as a newline character (
\n) is encountered.libnoderawfs.js: Properly mark TTY streams as non-seekable whenopened via
FS.open, and remove hardcodedseekable: falsefromstandard stream creation.
See: #27583