1
0
Fork 0
forked from svrjs/svrjs

Fix cluster shim for Bun

This commit is contained in:
Dorian Niemiec 2024-08-27 13:57:58 +02:00
parent 9b01d46907
commit f739f5dbbe

View file

@ -90,7 +90,7 @@ if (!process.singleThreaded) {
const child_process = require("child_process"); const child_process = require("child_process");
let newEnvironment = Object.assign({}, env ? env : process.env); let newEnvironment = Object.assign({}, env ? env : process.env);
newEnvironment.NODE_UNIQUE_ID = cluster._workersCounter; newEnvironment.NODE_UNIQUE_ID = cluster._workersCounter;
let newArguments = Object.assign({}, process.argv); let newArguments = Object.assign([], process.argv);
let command = newArguments.shift(); let command = newArguments.shift();
let newWorker = child_process.spawn(command, newArguments, { let newWorker = child_process.spawn(command, newArguments, {
env: newEnvironment, env: newEnvironment,