-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
child process output truncated #2360
Comments
This is a duplicate of #2049 although there is no public fix for this yet... |
Hm, are you sure its precisely the same bug? Whats peculiar to me is that when output.js is run directly, i always get all the output back, even when I make the loop run to 100000. Its only when I run it as a child process does the output get truncated. |
It does seem to be the same issue, and adding |
@cjihrig great! should this issue be closed then? i worded the issue differently from the duplicates, so i wonder if leaving it open will help others find this instead of spending time debugging themselves. |
Yea, let's close the duplicate. People will be able to find this now. |
Adding this option fixed it:
|
Create these two files:
Run
Note that you see 19999 as the last row in your console.
Run
Note that this script is supposed to output 20001. It doesn't, because the stdout from
child_process
ends before all the output is actually returned. It sends a nondeterministic amount of data beforeend
is fired.Removing the
process.exit(0)
fromoutput.js
resolves the problem. This is the workaround I'm using in my app. This is a regression; the code worked just fine in node 0.12Also interesting: the bug reproduces on OSX, but it doesn't seem to happen on Heroku, which I think uses a 64 bit linux.
The text was updated successfully, but these errors were encountered: