core pipe() is broken, breaking duplexer #2

substack opened this Issue Sep 26, 2012 · 1 comment


None yet
2 participants

When I run this program:

var spawn = require('child_process').spawn;
var ps = spawn('grep', [ 'ee' ]);

var fs = require('fs');
var rs = fs.createReadStream('/usr/share/dict/words');

var duplexer = require('duplexer');
var s = duplexer(ps.stdin, ps.stdout);


Most of the time it doesn't get all the way through because the read stream finishes, emitting 'end' before grep is done outputting data. This is because node core's pipe() is broken. Instead of depending on node's .pipe() you could try using duplex-pipe in the meantime.


Raynos commented Sep 26, 2012

@substack Are you blocked by this?

I would simply just use readable-stream and ignore the old pipe.

Raynos closed this May 25, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment