summaryrefslogtreecommitdiff
path: root/lib/tty.js
diff options
context:
space:
mode:
authorJeremiah Senkpiel <fishrock123@rocketmail.com>2016-07-14 12:24:10 +0200
committerAnna Henningsen <anna@addaleax.net>2016-08-10 23:41:28 +0200
commitab3306ad51d8136014aa0fa9278b57bb77105320 (patch)
treeeeeb3975677b29b203d87105067957b277d34b44 /lib/tty.js
parent4878e1c0e5c684174d6848799d546e726f11fd28 (diff)
downloadandroid-node-v8-ab3306ad51d8136014aa0fa9278b57bb77105320.tar.gz
android-node-v8-ab3306ad51d8136014aa0fa9278b57bb77105320.tar.bz2
android-node-v8-ab3306ad51d8136014aa0fa9278b57bb77105320.zip
tty: set the handle to blocking mode
Refs: https://github.com/nodejs/node/pull/1771 Refs: https://github.com/nodejs/node/issues/6456 Refs: https://github.com/nodejs/node/pull/6773 Refs: https://github.com/nodejs/node/issues/7743 PR-URL: https://github.com/nodejs/node/pull/6816 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/tty.js')
-rw-r--r--lib/tty.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tty.js b/lib/tty.js
index fe0cc2e521..576144e401 100644
--- a/lib/tty.js
+++ b/lib/tty.js
@@ -48,12 +48,12 @@ function WriteStream(fd) {
writable: true
});
- // Prevents interleaved stdout/stderr output in OS X terminals.
+ // Prevents interleaved or dropped stdout/stderr output for 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);
+ this._handle.setBlocking(process.env.NODE_TTY_UNSAFE_ASYNC !== '1');
var winSize = [];
var err = this._handle.getWindowSize(winSize);