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();
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();

2
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>

Loading…
Cancel
Save