@@ -50,8 +50,7 @@ Worker 6056 started
5050Worker 5644 started
5151```
5252
53- Please note that on Windows, it is not yet possible to set up a named pipe
54- server in a worker.
53+ On Windows, it is not yet possible to set up a named pipe server in a worker.
5554
5655## How It Works
5756
@@ -277,7 +276,7 @@ In the master, an internal message is sent to the worker causing it to call
277276
278277Causes ` .exitedAfterDisconnect ` to be set.
279278
280- Note that after a server is closed, it will no longer accept new connections,
279+ After a server is closed, it will no longer accept new connections,
281280but connections may be accepted by any other listening worker. Existing
282281connections will be allowed to close as usual. When no more connections exist,
283282see [ ` server.close() ` ] [ ] , the IPC channel to the worker will close allowing it
@@ -287,8 +286,8 @@ The above applies *only* to server connections, client connections are not
287286automatically closed by workers, and disconnect does not wait for them to close
288287before exiting.
289288
290- Note that in a worker, ` process.disconnect ` exists, but it is not this function,
291- it is [ ` disconnect ` ] [ ] .
289+ In a worker, ` process.disconnect ` exists, but it is not this function;
290+ it is [ ` disconnect() ` ] [ ] .
292291
293292Because long living server connections may block workers from disconnecting, it
294293may be useful to send a message, so application specific actions may be taken to
@@ -403,8 +402,8 @@ Causes `.exitedAfterDisconnect` to be set.
403402
404403This method is aliased as ` worker.destroy() ` for backwards compatibility.
405404
406- Note that in a worker, ` process.kill() ` exists, but it is not this function,
407- it is [ ` kill ` ] [ ] .
405+ In a worker, ` process.kill() ` exists, but it is not this function;
406+ it is [ ` kill() ` ] [ ] .
408407
409408### worker.process
410409<!-- YAML
@@ -419,7 +418,7 @@ is stored.
419418
420419See: [ Child Process module] [ ] .
421420
422- Note that workers will call ` process.exit(0) ` if the ` 'disconnect' ` event occurs
421+ Workers will call ` process.exit(0) ` if the ` 'disconnect' ` event occurs
423422on ` process ` and ` .exitedAfterDisconnect ` is not ` true ` . This protects against
424423accidental disconnection.
425424
@@ -758,14 +757,14 @@ changes:
758757` setupMaster ` is used to change the default 'fork' behavior. Once called,
759758the settings will be present in ` cluster.settings ` .
760759
761- Note that:
760+ Any settings changes only affect future calls to ` .fork() ` and have no
761+ effect on workers that are already running.
762762
763- * Any settings changes only affect future calls to ` .fork() ` and have no
764- effect on workers that are already running.
765- * The * only* attribute of a worker that cannot be set via ` .setupMaster() ` is
766- the ` env ` passed to ` .fork() ` .
767- * The defaults above apply to the first call only, the defaults for later
768- calls is the current value at the time of ` cluster.setupMaster() ` is called.
763+ The only attribute of a worker that cannot be set via ` .setupMaster() ` is
764+ the ` env ` passed to ` .fork() ` .
765+
766+ The defaults above apply to the first call only; the defaults for later
767+ calls are the current values at the time of ` cluster.setupMaster() ` is called.
769768
770769``` js
771770const cluster = require (' cluster' );
@@ -846,8 +845,8 @@ socket.on('data', (id) => {
846845[ `child_process` event: `'exit'` ] : child_process.html#child_process_event_exit
847846[ `child_process` event: `'message'` ] : child_process.html#child_process_event_message
848847[ `cluster.settings` ] : #cluster_cluster_settings
849- [ `disconnect` ] : child_process.html#child_process_subprocess_disconnect
850- [ `kill` ] : process.html#process_process_kill_pid_signal
848+ [ `disconnect() ` ] : child_process.html#child_process_subprocess_disconnect
849+ [ `kill() ` ] : process.html#process_process_kill_pid_signal
851850[ `process` event: `'message'` ] : process.html#process_event_message
852851[ `server.close()` ] : net.html#net_event_close
853852[ `worker.exitedAfterDisconnect` ] : #cluster_worker_exitedafterdisconnect
0 commit comments