benchmark: use process.execPath when pinning CPUs in run.js

The taskset path used the node from PATH, not the running binary.

Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/66724
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Rafael Gonzaga authored and Antoine du Hamel committed 2026-11-12 17:45:14 +01:00
1 parent f534a4c31f
commit 803cc10528
1 file changed
+1 -1
+1 -1
View File
@@ -56,7 +56,7 @@ function runBenchmark(filename) {
const cpuCore = cli.getCpuCoreSetting();
let child;
if (cpuCore !== null) {
child = spawn('taskset', ['-c', cpuCore, 'node', scriptPath, ...args], {
child = spawn('taskset', ['-c', cpuCore, process.execPath, scriptPath, ...args], {
stdio: ['inherit', 'inherit', 'inherit', 'ipc'],
});
} else {