joyent/node — pull request #2875 by miksago (2012-03-05 19:54:23+00:00)
Title: Implement process.execArgv & Command line arguments for Cluster.

This pull request enables the use of the new cluster api with command line arguments such as v8 flags (e.g., `--harmony_proxies`) or node flags (e.g., `--max-stack-size`).

The bulk of this change is to how node handles argv on startup, at present, we're mutating the original argv array, such that we cannot retrieve the original arguments that were passed into the program. This pull request fixes this issue by running the mutations on a copy of the argv array.

We can't easily change node to not mutate a `argv` style array, as the mutated argv array is then used to set the v8 options (using V8::SetFlagsFromCommandLine). There is potentially a future change that would make this pull request redundant, which is the rewrite of node's argument handling, however, this is a massive amount of work, and out of scope of what we needed to do, which was to use the cluster api with harmony proxies.

---

This pull request can't be merged until EqualMedia LTD sign the CLA, which should be done sometime tomorrow. This is because the work done by me (micheil smith) was done on the company time of EqualMedia LTD, and hence sponsored by them. I will comment on the pull request once we have signed the CLA.