Skip to content

Commit f8fb2c0

Browse files
addaleaxtargos
authored andcommitted
doc: linkify .fork() in cluster documentation
PR-URL: #30163 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 348ec69 commit f8fb2c0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

doc/api/cluster.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ added: v0.7.9
531531

532532
When any of the workers die the cluster module will emit the `'exit'` event.
533533

534-
This can be used to restart the worker by calling `.fork()` again.
534+
This can be used to restart the worker by calling [`.fork()`][] again.
535535

536536
```js
537537
cluster.on('exit', (worker, code, signal) => {
@@ -760,8 +760,8 @@ changes:
760760
* `windowsHide` {boolean} Hide the forked processes console window that would
761761
normally be created on Windows systems. **Default:** `false`.
762762

763-
After calling `.setupMaster()` (or `.fork()`) this settings object will contain
764-
the settings, including the default values.
763+
After calling [`.setupMaster()`][] (or [`.fork()`][]) this settings object will
764+
contain the settings, including the default values.
765765

766766
This object is not intended to be changed or set manually.
767767

@@ -779,11 +779,11 @@ changes:
779779
`setupMaster` is used to change the default 'fork' behavior. Once called,
780780
the settings will be present in `cluster.settings`.
781781

782-
Any settings changes only affect future calls to `.fork()` and have no
782+
Any settings changes only affect future calls to [`.fork()`][] and have no
783783
effect on workers that are already running.
784784

785785
The only attribute of a worker that cannot be set via `.setupMaster()` is
786-
the `env` passed to `.fork()`.
786+
the `env` passed to [`.fork()`][].
787787

788788
The defaults above apply to the first call only; the defaults for later
789789
calls are the current values at the time of `cluster.setupMaster()` is called.
@@ -862,6 +862,8 @@ socket.on('data', (id) => {
862862
});
863863
```
864864

865+
[`.fork()`]: #cluster_cluster_fork_env
866+
[`.setupMaster()`]: #cluster_cluster_setupmaster_settings
865867
[`ChildProcess.send()`]: child_process.html#child_process_subprocess_send_message_sendhandle_options_callback
866868
[`child_process.fork()`]: child_process.html#child_process_child_process_fork_modulepath_args_options
867869
[`child_process` event: `'exit'`]: child_process.html#child_process_event_exit

0 commit comments

Comments
 (0)