forked from svrjs/svrjs
Fix cluster shim for Bun
This commit is contained in:
parent
9b01d46907
commit
f739f5dbbe
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||||
|
|
Reference in a new issue