Skip to content

Commit 4af3da9

Browse files
DiegoRBaquerojasnell
authored andcommitted
doc: note message event listeners ref IPC channels
The IPC channel is referenced with the message event too. PR-URL: #11494 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent d481996 commit 4af3da9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/child_process.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -536,9 +536,9 @@ spawn('prg', [], { stdio: ['pipe', null, null, null, 'pipe'] });
536536
*It is worth noting that when an IPC channel is established between the
537537
parent and child processes, and the child is a Node.js process, the child
538538
is launched with the IPC channel unreferenced (using `unref()`) until the
539-
child registers an event handler for the `process.on('disconnected')` event.
540-
This allows the child to exit normally without the process being held open
541-
by the open IPC channel.*
539+
child registers an event handler for the `process.on('disconnect')` event
540+
or the `process.on('message')` event.This allows the child to exit normally
541+
without the process being held open by the open IPC channel.*
542542

543543
See also: [`child_process.exec()`][] and [`child_process.fork()`][]
544544

0 commit comments

Comments
 (0)