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

Read the entire STDIN. #146

Merged
merged 1 commit into from
Mar 6, 2013
Merged

Read the entire STDIN. #146

merged 1 commit into from
Mar 6, 2013

Conversation

mbostock
Copy link
Contributor

@mbostock mbostock commented Mar 6, 2013

The problem with reading synchronously from /dev/stdin is that you can get a spurious EOF when the input buffer is empty, even if more content is coming. Now STDIN is read from a loop, and only stops polling when all input has been read. This fixes #70 #85 and other errors related to parsing large files on STDIN.

The problem with reading synchronously from /dev/stdin is that you can get a
spurious EOF when the input buffer is empty, even if more content is coming. Now
STDIN is read from a loop, and only stops polling when all input has been read.
This fixes #70 #85 and other errors related to parsing large files on STDIN.
mishoo added a commit that referenced this pull request Mar 6, 2013
@mishoo mishoo merged commit 3bd7ca9 into mishoo:master Mar 6, 2013
@mishoo
Copy link
Owner

mishoo commented Mar 6, 2013

Thanks for the patch! I don't have a Mac unfortunately so I can't test that it fixes the issue, will just take your word for it. :-)

I'll probably refactor this at some point and make it use async reads, so that it works on Windows too.

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.

STDIN parsing errors
2 participants