improve process.exit() workaround (#2741)

- use public API
- fix issue with Node.js 0.10 on WIndows
This commit is contained in:
Alex Lam S.L
2018-01-07 17:53:50 +08:00
committed by GitHub
parent 1ee8be8d91
commit 9809567dfc
4 changed files with 18 additions and 15 deletions

View File

@@ -3,11 +3,7 @@
"use strict";
// 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);
});
require("../tools/exit");
var fs = require("fs");
var info = require("../package.json");