From 908d9f5b04737c44452e8447c8329aaa7ceaba6e Mon Sep 17 00:00:00 2001 From: kzc Date: Sun, 1 May 2016 00:59:29 -0400 Subject: [PATCH] Workaround for process.exit() tty output truncation. Fixes #1055 --- tools/node.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/node.js b/tools/node.js index ecbf8d3eaf1..8cd3e4be428 100644 --- a/tools/node.js +++ b/tools/node.js @@ -1,3 +1,9 @@ +// workaround for tty output truncation upon process.exit() +[process.stdout, process.stderr].forEach(function(stream){ + if (stream._handle && stream._handle.setBlocking) + stream._handle.setBlocking(true); +}); + var path = require("path"); var fs = require("fs");