From: Herbert Vojčík Date: Wed, 28 Apr 2010 23:07:13 +0000 (+0200) Subject: DRY binding('stdio') X-Git-Tag: v0.1.93~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=039d13b0c352766225c27cb6df0d7df05aac5c36;p=platform%2Fupstream%2Fnodejs.git DRY binding('stdio') --- diff --git a/src/node.js b/src/node.js index 216f50d..4a6ed96 100644 --- a/src/node.js +++ b/src/node.js @@ -141,11 +141,12 @@ var stdin; process.openStdin = function () { if (stdin) return stdin; - var net = module.requireNative('net'), +var binding = process.binding('stdio'), + net = module.requireNative('net'), fs = module.requireNative('fs'), - fd = process.binding('stdio').openStdin(); + fd = binding.openStdin(); - if (process.binding('stdio').isStdinBlocking()) { + if (binding.isStdinBlocking()) { stdin = new net.Stream(fd); stdin.readable = true; } else {