Skip to content
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

Handle EOF #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Handle EOF #1

wants to merge 2 commits into from

Conversation

boxdot
Copy link

@boxdot boxdot commented Sep 30, 2015

Before: EOF is not handled at all. In particular, process.stdin.resume is sometimes called on the closed stdin stream, and in that case node.js terminates without an error.

This is a proposal. The handling of EOF in this pull is a little bit hacky. The getC request to the native module returns '\0' if stdin is in EOF state. Better would be a proper error handling and isEof function. Right now, I have no idea how to do it. Feel free to make it better.

API changes:

  • add getContents function incl. a test

* add getContents function incl. a test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant