From f73b6e219046bf66505c1fa1cd07d82b8644329d Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 20 May 2010 22:11:26 -0700 Subject: [PATCH] Fix opposite logic, which coincidentially works --- src/node.js | 4 ++-- 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 IsStdinBlocking (const Arguments& args) { HandleScope scope; - return scope.Close(Boolean::New(isatty(STDIN_FILENO))); + return scope.Close(Boolean::New(!isatty(STDIN_FILENO))); } static Handle