Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
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>
  • Loading branch information
evanlucas committed Mar 29, 2016
commit b6475b9a9d0da0971eec7eb5559dff4d18a0e721
8 changes: 1 addition & 7 deletions lib/tty.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down