Closed
Description
The following fails with Node 4.1 (but passes on 0.12 and 0.10) on OS 10.10.5:
var assert = require('assert');
var spawn = require('child_process').spawn;
var out = new Array(Math.pow(2, 13)).join('.') + '!!';
if (process.argv[2] === '--child') {
process.stdout.write(out);
process.exit(0);
} else {
var child = spawn(process.argv[0], [process.argv[1], '--child']);
var got = '';
child.stdout.on('data', function(data) {
got += String(data);
});
child.on('exit', function() {
assert.equal(got, out);
});
}
The child writes 8193 bytes to stdout. The parent only gets 8192 before the exit.
See also nodejs/node-v0.x-archive#8329.