Pipe bug
Closed this issue · 7 comments
AndreasMadsen commented
Reproduce by executing:
// RUN: echo '{"hallo": true}' | node tools/interactive.js
console.dir = require('cdir');
process.stdin.once('data', function (chunk) {
console.dir(JSON.parse(chunk.toString()));
});
process.stdin.resume();
result is:
Assertion failed: (!!(events & UV__IO_READ) ^ !!(events & UV__IO_WRITE)), function uv__stream_io, file ../deps/uv/src/unix/stream.c, line 729.
Abort trap: 6
heapwolf commented
/cc @TooTallNate
TooTallNate commented
/cc @indutny, what's the status of the select() tty stuff in node right now?
See nodejs/node-v0.x-archive#3072 for a little background.
indutny commented
Hm... seems to be working on the latest master for me.
AndreasMadsen commented
$node -v
v0.8.15
$echo '{"hallo": true}' | node test.js
▸ Object
Assertion failed: (!!(events & UV__IO_READ) ^ !!(events & UV__IO_WRITE)), function uv__stream_io, file ../deps/uv/src/unix/stream.c, line 729.
Abort trap: 6
$node -v
v0.9.4-pre
$echo '{"hallo": true}' | node test.js
▸ Object
# totally frozen 99% CPU
$node -v
v0.9.6-pre
$echo '{"hallo": true}' | node test.js
▸ Object
# totally frozen 99% CPU
indutny commented
@AndreasMadsen already fixed, waiting for @bnoordhuis to pull my patch in.
AndreasMadsen commented
@indutny you are faster than your shadow, thanks.