Skip to content

Commit c0703f0

Browse files
mutantcornholioaddaleax
authored andcommitted
doc: fixes in cluster.md
* Capitalization and punctuation. * `setupMaster` contained info about `settings` which where incomplete. PR-URL: #14140 Fixes: #8495 Fixes: #12941 Refs: #9659 Refs: #13761 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent f5bea63 commit c0703f0

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

doc/api/cluster.md

+11-17
Original file line numberDiff line numberDiff line change
@@ -734,12 +734,12 @@ changes:
734734
-->
735735

736736
* {Object}
737-
* `execArgv` {Array} list of string arguments passed to the Node.js
737+
* `execArgv` {Array} List of string arguments passed to the Node.js
738738
executable. (Default=`process.execArgv`)
739-
* `exec` {string} file path to worker file. (Default=`process.argv[1]`)
740-
* `args` {Array} string arguments passed to worker.
739+
* `exec` {string} File path to worker file. (Default=`process.argv[1]`)
740+
* `args` {Array} String arguments passed to worker.
741741
(Default=`process.argv.slice(2)`)
742-
* `silent` {boolean} whether or not to send output to parent's stdio.
742+
* `silent` {boolean} Whether or not to send output to parent's stdio.
743743
(Default=`false`)
744744
* `stdio` {Array} Configures the stdio of forked processes. Because the
745745
cluster module relies on IPC to function, this configuration must contain an
@@ -761,26 +761,19 @@ changes:
761761
description: The `stdio` option is supported now.
762762
-->
763763

764-
* `settings` {Object}
765-
* `exec` {string} file path to worker file. (Default=`process.argv[1]`)
766-
* `args` {Array} string arguments passed to worker.
767-
(Default=`process.argv.slice(2)`)
768-
* `silent` {boolean} whether or not to send output to parent's stdio.
769-
(Default=`false`)
770-
* `stdio` {Array} Configures the stdio of forked processes. When this option
771-
is provided, it overrides `silent`.
764+
* `settings` {Object} see [`cluster.settings`][]
772765

773766
`setupMaster` is used to change the default 'fork' behavior. Once called,
774767
the settings will be present in `cluster.settings`.
775768

776769
Note that:
777770

778-
* any settings changes only affect future calls to `.fork()` and have no
779-
effect on workers that are already running
771+
* Any settings changes only affect future calls to `.fork()` and have no
772+
effect on workers that are already running.
780773
* The *only* attribute of a worker that cannot be set via `.setupMaster()` is
781-
the `env` passed to `.fork()`
782-
* the defaults above apply to the first call only, the defaults for later
783-
calls is the current value at the time of `cluster.setupMaster()` is called
774+
the `env` passed to `.fork()`.
775+
* The defaults above apply to the first call only, the defaults for later
776+
calls is the current value at the time of `cluster.setupMaster()` is called.
784777

785778
Example:
786779

@@ -868,3 +861,4 @@ socket.on('data', (id) => {
868861
[Child Process module]: child_process.html#child_process_child_process_fork_modulepath_args_options
869862
[child_process event: 'exit']: child_process.html#child_process_event_exit
870863
[child_process event: 'message']: child_process.html#child_process_event_message
864+
[`cluster.settings`]: #clustersettings

0 commit comments

Comments
 (0)