Browse Source

Fix opposite logic, which coincidentially works

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
f73b6e2190
  1. 4
      src/node.js
  2. 2
      src/node_stdio.cc

4
src/node.js

@ -175,10 +175,10 @@ process.openStdin = function () {
fd = binding.openStdin(); fd = binding.openStdin();
if (binding.isStdinBlocking()) { if (binding.isStdinBlocking()) {
stdin = new fs.ReadStream(null, {fd: fd});
} else {
stdin = new net.Stream(fd); stdin = new net.Stream(fd);
stdin.readable = true; stdin.readable = true;
} else {
stdin = new fs.ReadStream(null, {fd: fd});
} }
stdin.resume(); stdin.resume();

2
src/node_stdio.cc

@ -69,7 +69,7 @@ static Handle<Value>
IsStdinBlocking (const Arguments& args) IsStdinBlocking (const Arguments& args)
{ {
HandleScope scope; HandleScope scope;
return scope.Close(Boolean::New(isatty(STDIN_FILENO))); return scope.Close(Boolean::New(!isatty(STDIN_FILENO)));
} }
static Handle<Value> static Handle<Value>

Loading…
Cancel
Save