Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-10-29 18:43:35 +0300
committerAnna Henningsen <anna@addaleax.net>2019-11-01 14:56:32 +0300
commitb4d7a31a20dc15624076f79bb75d66a2dc16883d (patch)
treec4b20b58b15ed57764f714dc10994d8ecc167a02 /doc/api/cluster.md
parent9529c6660f5cc0de106a60f78d9dbafb6ccea26a (diff)
doc: linkify `.fork()` in cluster documentation
PR-URL: https://github.com/nodejs/node/pull/30163 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'doc/api/cluster.md')
-rw-r--r--doc/api/cluster.md12
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/api/cluster.md b/doc/api/cluster.md
index 179a775074a..c4a47539472 100644
--- a/doc/api/cluster.md
+++ b/doc/api/cluster.md
@@ -531,7 +531,7 @@ added: v0.7.9
When any of the workers die the cluster module will emit the `'exit'` event.
-This can be used to restart the worker by calling `.fork()` again.
+This can be used to restart the worker by calling [`.fork()`][] again.
```js
cluster.on('exit', (worker, code, signal) => {
@@ -760,8 +760,8 @@ changes:
* `windowsHide` {boolean} Hide the forked processes console window that would
normally be created on Windows systems. **Default:** `false`.
-After calling `.setupMaster()` (or `.fork()`) this settings object will contain
-the settings, including the default values.
+After calling [`.setupMaster()`][] (or [`.fork()`][]) this settings object will
+contain the settings, including the default values.
This object is not intended to be changed or set manually.
@@ -779,11 +779,11 @@ changes:
`setupMaster` is used to change the default 'fork' behavior. Once called,
the settings will be present in `cluster.settings`.
-Any settings changes only affect future calls to `.fork()` and have no
+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 `env` passed to [`.fork()`][].
The defaults above apply to the first call only; the defaults for later
calls are the current values at the time of `cluster.setupMaster()` is called.
@@ -862,6 +862,8 @@ socket.on('data', (id) => {
});
```
+[`.fork()`]: #cluster_cluster_fork_env
+[`.setupMaster()`]: #cluster_cluster_setupmaster_settings
[`ChildProcess.send()`]: child_process.html#child_process_subprocess_send_message_sendhandle_options_callback
[`child_process.fork()`]: child_process.html#child_process_child_process_fork_modulepath_args_options
[`child_process` event: `'exit'`]: child_process.html#child_process_event_exit