diff --git a/benchmark/common.js b/benchmark/common.js index 88cb8a560f4..080cfc71785 100644 --- a/benchmark/common.js +++ b/benchmark/common.js @@ -289,7 +289,13 @@ function formatResult(data) { function sendResult(data) { if (process.send) { // If forked, report by process send - process.send(data); + process.send(data, () => { + // If, for any reason, the process is unable to self close within + // a second after completing, forcefully close it. + setTimeout(() => { + process.exit(0); + }, 5000).unref(); + }); } else { // Otherwise report by stdout process.stdout.write(formatResult(data));