Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d7bfc6c

Browse filesBrowse files
addaleaxtargos
authored andcommitted
doc: linkify .fork() in cluster documentation
PR-URL: #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>
1 parent b654673 commit d7bfc6c
Copy full SHA for d7bfc6c

File tree

Expand file treeCollapse file tree

1 file changed

+7
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-5
lines changed
Open diff view settings
Collapse file

‎doc/api/cluster.md‎

Copy file name to clipboardExpand all lines: doc/api/cluster.md
+7-5Lines changed: 7 additions & 5 deletions
  • Display the source diff
  • Display the rich diff
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.