From b3d7c3af3639ae1912ca76fdc3308095773b221f Mon Sep 17 00:00:00 2001 From: Paolo Insogna Date: Tue, 28 Jun 2022 15:28:59 +0200 Subject: [PATCH] benchmark: fix fork detection --- benchmark/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/common.js b/benchmark/common.js index 080cfc71785eec..e582dc8bdc219f 100644 --- a/benchmark/common.js +++ b/benchmark/common.js @@ -287,7 +287,7 @@ function formatResult(data) { } function sendResult(data) { - if (process.send) { + if (process.send && Object.hasOwn(process.env, 'NODE_RUN_BENCHMARK_FN')) { // If forked, report by process send process.send(data, () => { // If, for any reason, the process is unable to self close within