Skip to content

Register a TTY #6861

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

Closed
lunu-bounir opened this issue Jul 15, 2018 · 2 comments
Closed

Register a TTY #6861

lunu-bounir opened this issue Jul 15, 2018 · 2 comments

Comments

@lunu-bounir
Copy link

I am using the incoming version and it has a TTY object which seems to be responsible of reading from stdin and writing to stdout. Basically I need to redirect these two to a JS library to parse (termlib.js in my case). I cannot seem to be able to use the FS.init as I get Input is not from a terminal in the console of my application. So I was wondering if this TTY.register can be useful or not. Couldn't find any documentation about how to use it.

@kripken
Copy link
Member

kripken commented Jul 18, 2018

Those internal details might not be well-documented, yeah - only option may be to read the source code in library_fs.js.

If all you need is stdin/stdout, though, then I believe you can define stdin and stdout on Module (a quick read in the source seems to support that too). However, I don't see this documented on

https://kripken.github.io/emscripten-site/docs/api_reference/module.html

We should add docs for it there.

@stale
Copy link

stale bot commented Sep 18, 2019

This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants