diff options
-rw-r--r-- | src/node.js | 4 | ||||
-rw-r--r-- | src/node_stdio.cc | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/node.js b/src/node.js index 66523f5374..a17ba6f697 100644 --- a/src/node.js +++ b/src/node.js @@ -175,10 +175,10 @@ process.openStdin = function () { fd = binding.openStdin(); if (binding.isStdinBlocking()) { + stdin = new fs.ReadStream(null, {fd: fd}); + } else { stdin = new net.Stream(fd); stdin.readable = true; - } else { - stdin = new fs.ReadStream(null, {fd: fd}); } stdin.resume(); diff --git a/src/node_stdio.cc b/src/node_stdio.cc index 183a6ea248..a68d302fd1 100644 --- a/src/node_stdio.cc +++ b/src/node_stdio.cc @@ -69,7 +69,7 @@ static Handle<Value> IsStdinBlocking (const Arguments& args) { HandleScope scope; - return scope.Close(Boolean::New(isatty(STDIN_FILENO))); + return scope.Close(Boolean::New(!isatty(STDIN_FILENO))); } static Handle<Value> |