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

Determine when this was applicable from #7

Closed
esainane opened this issue Jan 28, 2016 · 1 comment
Closed

Determine when this was applicable from #7

esainane opened this issue Jan 28, 2016 · 1 comment

Comments

@esainane
Copy link

I tested various versions of vanilla node, using a large json file, and the underscore-cli print utility.

  • When I redirect a large underscore print to a file using the latest version of node (v5.5.0, released 2016-01-21, installed via n latest), the file is truncated to 65536 bytes as described.
  • When I redirect a large underscore print to a file using the older post-io.js version of node (v4.0.0, released 2015-09-08, installable via n 4.0), the file is also truncated to 65536 bytes.
  • When I redirect a large underscore print to a file using the latest pre-io.js version of node (v0.12.9, released 2015-12-03, installable via n 0.12), the file is written fully (nearly three times as large).

This suggests that something happened in the great merge of io.js, either directly or indirectly.

Since node used to handle stream redirection fine, this might be an upstream issue in node?

@mbostock
Copy link
Owner

See nodejs/node-v0.x-archive#7412 for some history.

And see nodejs/node#1074 for a partial fix, specifically for the reading non-regular files bug.

But that’s mostly just the truncation problem reading from /dev/stdin. The rw module also fixes the UNKNOWN error when trying to writeFileSync to stdout and the PIPE error when piping to head (or any downstream process that terminates without reading all of the input).

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

No branches or pull requests

2 participants