joyent/node — pull request #7007 by smikes (2014-01-30 23:33:05+00:00)
Title: module: new switch -x; support multiple #! args

module: new switch -x; support multiple #! args

Interpreters invoked via #! see only one
argument on some environments (Linux, Cygwin)

This pull request enables a script to pass multiple
arguments,such as v8 options, to node using a technique
developed for other scripting languages (perl and
ruby).

Detailed justification and analysis (TL;DR) in the attached
file doc/Minux-X-Switch-Proposal.md , link http://bit.ly/1bbkQ2X or
https://github.com/smikes/node/blob/minus-x-switch/doc/Minus-X-Switch-Proposal.md

This pull request *DOES NOT* make any changes to
the *public* API of module, which is a locked
subsystem.

lint clean, added unit tests for new function Module._removePrologue
and integration test for node -x invocation, tested on OSX,
Windows, Ubuntu AWS instance.