elm-console icon indicating copy to clipboard operation
elm-console copied to clipboard

Handle EOF

Open boxdot opened this issue 9 years ago • 0 comments

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

boxdot avatar Sep 30 '15 13:09 boxdot