Skip to content

Handle EOF#1

Open
boxdot wants to merge 2 commits intolaszlopandy:masterfrom
boxdot:master
Open

Handle EOF#1
boxdot wants to merge 2 commits intolaszlopandy:masterfrom
boxdot:master

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