From f4c41134349694f5cc16023941deb3551d93a49e 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 PR-URL: https://github.com/nodejs/node/pull/43601 Reviewed-By: Antoine du Hamel Reviewed-By: Matteo Collina --- 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