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

@@ -5,11 +5,7 @@
var site = "http://browserbench.org/JetStream";
if (typeof phantom == "undefined") {
// 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 args = process.argv.slice(2);
var debug = args.indexOf("--debug");
if (debug >= 0) {