Skip to content

Commit b6475b9

Browse files
committed
Revert "tty: don't read from console stream upon creation"
This reverts commit 4611389. The offending commit broke certain usages of piping from stdin. Fixes: #5927 PR-URL: #5947 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Alexis Campailla <orangemocha@nodejs.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 89abe86 commit b6475b9

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lib/tty.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,17 @@ function ReadStream(fd, options) {
1717
if (!(this instanceof ReadStream))
1818
return new ReadStream(fd, options);
1919

20-
// pauseOnCreate to avoid reading from the sytem buffer
2120
options = util._extend({
2221
highWaterMark: 0,
2322
readable: true,
2423
writable: false,
25-
handle: new TTY(fd, true),
26-
pauseOnCreate: true
24+
handle: new TTY(fd, true)
2725
}, options);
2826

2927
net.Socket.call(this, options);
3028

3129
this.isRaw = false;
3230
this.isTTY = true;
33-
34-
// Let the stream resume automatically when 'data' event handlers
35-
// are added, even though it was paused on creation
36-
this._readableState.flowing = null;
3731
}
3832
inherits(ReadStream, net.Socket);
3933

0 commit comments

Comments
 (0)