joyent/node — pull request #1888 by koichik (2011-10-14 09:00:41+00:00)
Title: child_process.fork: don't modify args

Because `child_process.fork()` modify `args` argument, the worker processes after the second cannot get right arguments with `cluster`.
example:

`a.js`

```javascript
console.log(process.env.NODE_WORKER_ID, process.argv);
```

result:

$ node cluster a.js foo bar
Detected 2 cpus
Worker 5097 online
Worker 5098 online
1 [ '/home/koichik/git/joyent/node/out/Release/node',
'/tmp/a.js',
'foo',
'bar' ]
2 [ '/home/koichik/git/joyent/node/out/Release/node',
'/tmp/a.js',
'/tmp/a.js',
'foo',
'bar' ]