Skip to content

Commit f73b6e2

Browse files
committed
Fix opposite logic, which coincidentially works
1 parent 8c56284 commit f73b6e2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/node.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,10 @@ process.openStdin = function () {
175175
fd = binding.openStdin();
176176

177177
if (binding.isStdinBlocking()) {
178+
stdin = new fs.ReadStream(null, {fd: fd});
179+
} else {
178180
stdin = new net.Stream(fd);
179181
stdin.readable = true;
180-
} else {
181-
stdin = new fs.ReadStream(null, {fd: fd});
182182
}
183183

184184
stdin.resume();

src/node_stdio.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static Handle<Value>
6969
IsStdinBlocking (const Arguments& args)
7070
{
7171
HandleScope scope;
72-
return scope.Close(Boolean::New(isatty(STDIN_FILENO)));
72+
return scope.Close(Boolean::New(!isatty(STDIN_FILENO)));
7373
}
7474

7575
static Handle<Value>

0 commit comments

Comments
 (0)