Skip to content

Commit 9a684a1

Browse files
DiegoRBaqueroMylesBorins
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 05909d0 commit 9a684a1

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
@@ -554,9 +554,9 @@ spawn('prg', [], { stdio: ['pipe', null, null, null, 'pipe'] });
554554
*It is worth noting that when an IPC channel is established between the
555555
parent and child processes, and the child is a Node.js process, the child
556556
is launched with the IPC channel unreferenced (using `unref()`) until the
557-
child registers an event handler for the [`process.on('disconnect')`][] event.
558-
This allows the child to exit normally without the process being held open
559-
by the open IPC channel.*
557+
child registers an event handler for the [`process.on('disconnect')`][] event
558+
or the [`process.on('message')`][] event.This allows the child to exit normally
559+
without the process being held open by the open IPC channel.*
560560

561561
See also: [`child_process.exec()`][] and [`child_process.fork()`][]
562562

0 commit comments

Comments
 (0)