Added documentation for process.execArgv
authorEdward Hutchins <eahutchins@gmail.com>
Thu, 23 May 2013 01:04:36 +0000 (18:04 -0700)
committerisaacs <i@izs.me>
Mon, 19 Aug 2013 22:53:09 +0000 (15:53 -0700)
doc/api/process.markdown

index d128620..802f247 100644 (file)
@@ -167,6 +167,28 @@ Example:
     /usr/local/bin/node
 
 
+## process.execArgv
+
+This is the set of node-specific command line options from the
+executable that started the process.  These options do not show up in
+`process.argv`, and do not include the node executable, the name of
+the script, or any options following the script name. These options
+are useful in order to spawn child processes with the same execution
+environment as the parent.
+
+Example:
+
+    $ node --harmony script.js --version
+
+results in process.execArgv:
+
+    ['--harmony']
+
+and process.argv:
+
+    ['/usr/local/bin/node', 'script.js', '--version']
+
+
 ## process.abort()
 
 This causes node to emit an abort. This will cause node to exit and