mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
doc: note message event listeners ref IPC channels
The IPC channel is referenced with the message event too. PR-URL: https://github.com/nodejs/node/pull/11494 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
1 parent
f0c7c7fad4
commit
f4bc12dd11
1 file changed
+3
-3
@@ -536,9 +536,9 @@ spawn('prg', [], { stdio: ['pipe', null, null, null, 'pipe'] });
|
||||
*It is worth noting that when an IPC channel is established between the
|
||||
parent and child processes, and the child is a Node.js process, the child
|
||||
is launched with the IPC channel unreferenced (using `unref()`) until the
|
||||
child registers an event handler for the `process.on('disconnected')` event.
|
||||
This allows the child to exit normally without the process being held open
|
||||
by the open IPC channel.*
|
||||
child registers an event handler for the `process.on('disconnect')` event
|
||||
or the `process.on('message')` event.This allows the child to exit normally
|
||||
without the process being held open by the open IPC channel.*
|
||||
|
||||
See also: [`child_process.exec()`][] and [`child_process.fork()`][]
|
||||
|
||||
|
||||
Reference in new issue
Block a user