From 7cdfe8a3fcb68a4e73f0dd4966cb12e8f86628d7 Mon Sep 17 00:00:00 2001 From: Ali Hassan Date: Thu, 11 Apr 2024 01:35:58 +0500 Subject: [PATCH] benchmark: inherit stdio/stderr instead of pipe PR-URL: https://github.com/nodejs/node/pull/52456 Fixes: https://github.com/nodejs/node/issues/52233 Refs: https://github.com/nodejs/performance/pull/161 Reviewed-By: Matteo Collina Reviewed-By: Raz Luvaton --- benchmark/compare.js | 5 +---- benchmark/run.js | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/benchmark/compare.js b/benchmark/compare.js index 0c53d90def371b..ad3084db390414 100644 --- a/benchmark/compare.js +++ b/benchmark/compare.js @@ -83,11 +83,8 @@ if (showProgress) { const spawnArgs = ['-c', cpuCore, cli.optional[job.binary], resolvedPath, ...cli.optional.set]; child = spawn('taskset', spawnArgs, { env: process.env, - stdio: ['inherit', 'pipe', 'pipe', 'ipc'], + stdio: ['inherit', 'inherit', 'inherit', 'ipc'], }); - - child.stdout.pipe(process.stdout); - child.stderr.pipe(process.stderr); } else { child = fork(resolvedPath, cli.optional.set, { execPath: cli.optional[job.binary], diff --git a/benchmark/run.js b/benchmark/run.js index ff2d41e6056aa2..6a61df71221710 100644 --- a/benchmark/run.js +++ b/benchmark/run.js @@ -54,11 +54,8 @@ if (format === 'csv') { let child; if (cpuCore !== null) { child = spawn('taskset', ['-c', cpuCore, 'node', scriptPath, ...args], { - stdio: ['inherit', 'pipe', 'pipe', 'ipc'], + stdio: ['inherit', 'inherit', 'inherit', 'ipc'], }); - - child.stdout.pipe(process.stdout); - child.stderr.pipe(process.stderr); } else { child = fork( scriptPath,