summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-05-20 22:11:26 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-05-20 22:11:26 -0700
commitf73b6e219046bf66505c1fa1cd07d82b8644329d (patch)
treea83b1247175a82e42837f1d44887b9aa02b10f24
parent8c562847764bf60c9dd658e4540ce6d887b6957f (diff)
downloadnode-new-f73b6e219046bf66505c1fa1cd07d82b8644329d.tar.gz
Fix opposite logic, which coincidentially works
-rw-r--r--src/node.js4
-rw-r--r--src/node_stdio.cc2
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>