Created
April 18, 2014 17:08
-
-
Save mafintosh/11054481 to your computer and use it in GitHub Desktop.
epipe from stdin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// run this: node test-no-stdin.js | cat - | |
var buf = new Buffer(512); | |
var cnt = 0; | |
buf.fill(97); | |
setInterval(function() { | |
console.log(buf.toString()+' #'+(cnt++)); | |
}, 5); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// run this: node test-stdin.js | cat - | |
process.stdin; | |
var buf = new Buffer(512); | |
var cnt = 0; | |
buf.fill(97); | |
setInterval(function() { | |
console.log(buf.toString()+' #'+(cnt++)); | |
}, 5); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment