benchmark: fix fork detection

PR-URL: https://github.com/nodejs/node/pull/43601
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit is contained in:
Paolo Insogna committed 2022-06-29 08:36:20 +02:00
1 parent ea99431586
commit d636fee319
1 file changed
+1 -1
+1 -1
View File
@@ -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