mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
Revert "tty: don't read from console stream upon creation"
This reverts commit 4611389294
.
The offending commit broke certain usages of piping from stdin.
Fixes: https://github.com/nodejs/node/issues/5927
PR-URL: https://github.com/nodejs/node/pull/5947
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
89abe86808
commit
b6475b9a9d
@ -17,23 +17,17 @@ function ReadStream(fd, options) {
|
||||
if (!(this instanceof ReadStream))
|
||||
return new ReadStream(fd, options);
|
||||
|
||||
// pauseOnCreate to avoid reading from the sytem buffer
|
||||
options = util._extend({
|
||||
highWaterMark: 0,
|
||||
readable: true,
|
||||
writable: false,
|
||||
handle: new TTY(fd, true),
|
||||
pauseOnCreate: true
|
||||
handle: new TTY(fd, true)
|
||||
}, options);
|
||||
|
||||
net.Socket.call(this, options);
|
||||
|
||||
this.isRaw = false;
|
||||
this.isTTY = true;
|
||||
|
||||
// Let the stream resume automatically when 'data' event handlers
|
||||
// are added, even though it was paused on creation
|
||||
this._readableState.flowing = null;
|
||||
}
|
||||
inherits(ReadStream, net.Socket);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user