diff options
author | cornholio <0@mcornholio.ru> | 2017-07-10 15:19:57 -0400 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2017-07-14 19:11:39 -0400 |
commit | ca5b0c4f11c4f7ef7791153af6f1a968be17d079 (patch) | |
tree | c829f3ec17c54eb5322e14dbbddf9b4c25bbec05 /doc/api/cluster.md | |
parent | 074b7c271c73bd1c4fb432099b743edd5d7a67d7 (diff) | |
download | node-new-ca5b0c4f11c4f7ef7791153af6f1a968be17d079.tar.gz |
doc: fixes in cluster.md
* Capitalization and punctuation.
* `setupMaster` contained info about `settings` which where incomplete.
PR-URL: https://github.com/nodejs/node/pull/14140
Fixes: https://github.com/nodejs/node/issues/8495
Fixes: https://github.com/nodejs/node/issues/12941
Refs: https://github.com/nodejs/node/pull/9659
Refs: https://github.com/nodejs/node/pull/13761
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'doc/api/cluster.md')
-rw-r--r-- | doc/api/cluster.md | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/doc/api/cluster.md b/doc/api/cluster.md index e371583b3a..85c3f2deb9 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -700,12 +700,12 @@ changes: --> * {Object} - * `execArgv` {Array} list of string arguments passed to the Node.js + * `execArgv` {Array} List of string arguments passed to the Node.js executable. (Default=`process.execArgv`) - * `exec` {string} file path to worker file. (Default=`process.argv[1]`) - * `args` {Array} string arguments passed to worker. + * `exec` {string} File path to worker file. (Default=`process.argv[1]`) + * `args` {Array} String arguments passed to worker. (Default=`process.argv.slice(2)`) - * `silent` {boolean} whether or not to send output to parent's stdio. + * `silent` {boolean} Whether or not to send output to parent's stdio. (Default=`false`) * `stdio` {Array} Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must contain an @@ -727,26 +727,19 @@ changes: description: The `stdio` option is supported now. --> -* `settings` {Object} - * `exec` {string} file path to worker file. (Default=`process.argv[1]`) - * `args` {Array} string arguments passed to worker. - (Default=`process.argv.slice(2)`) - * `silent` {boolean} whether or not to send output to parent's stdio. - (Default=`false`) - * `stdio` {Array} Configures the stdio of forked processes. When this option - is provided, it overrides `silent`. +* `settings` {Object} see [`cluster.settings`][] `setupMaster` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`. Note that: -* any settings changes only affect future calls to `.fork()` and have no - effect on workers that are already running +* Any settings changes only affect future calls to `.fork()` and have no + effect on workers that are already running. * The *only* attribute of a worker that cannot be set via `.setupMaster()` is - the `env` passed to `.fork()` -* the defaults above apply to the first call only, the defaults for later - calls is the current value at the time of `cluster.setupMaster()` is called + the `env` passed to `.fork()`. +* The defaults above apply to the first call only, the defaults for later + calls is the current value at the time of `cluster.setupMaster()` is called. Example: @@ -834,3 +827,4 @@ socket.on('data', (id) => { [Child Process module]: child_process.html#child_process_child_process_fork_modulepath_args_options [child_process event: 'exit']: child_process.html#child_process_event_exit [child_process event: 'message']: child_process.html#child_process_event_message +[`cluster.settings`]: #clustersettings |