Skip to content

Commit

Permalink
benchmark: fix fork detection
Browse files Browse the repository at this point in the history
PR-URL: nodejs/node#43601
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
  • Loading branch information
ShogunPanda authored and guangwong committed Oct 10, 2022
1 parent 34fc59f commit 5d00c3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benchmark/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5d00c3b

Please sign in to comment.