Skip to content

Commit

Permalink
tty: use blocking mode on OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
Fishrock123 committed May 26, 2016
1 parent b1a05eb commit f4dcdfa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/tty.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ function WriteStream(fd) {
writable: true
});

// Prevents interleaved stdout/stderr output in OS X terminals.
// As noted in the following reference, local TTYs tend to be quite fast and
// this behaviour has become expected due historical functionality on OS X,
// even though it was originally intended to change in v1.0.2 (Libuv 1.2.1).
// Ref: https://github.com/nodejs/node/pull/1771#issuecomment-119351671
if (process.platform === 'darwin') this._handle.setBlocking(true);

var winSize = [];
var err = this._handle.getWindowSize(winSize);
if (!err) {
Expand Down

0 comments on commit f4dcdfa

Please sign in to comment.