We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c56284 commit f73b6e2Copy full SHA for f73b6e2
src/node.js
@@ -175,10 +175,10 @@ process.openStdin = function () {
175
fd = binding.openStdin();
176
177
if (binding.isStdinBlocking()) {
178
+ stdin = new fs.ReadStream(null, {fd: fd});
179
+ } else {
180
stdin = new net.Stream(fd);
181
stdin.readable = true;
- } else {
- stdin = new fs.ReadStream(null, {fd: fd});
182
}
183
184
stdin.resume();
src/node_stdio.cc
@@ -69,7 +69,7 @@ static Handle<Value>
69
IsStdinBlocking (const Arguments& args)
70
{
71
HandleScope scope;
72
- return scope.Close(Boolean::New(isatty(STDIN_FILENO)));
+ return scope.Close(Boolean::New(!isatty(STDIN_FILENO)));
73
74
75
static Handle<Value>
0 commit comments