Skip to content

Commit

Permalink
doc: note message event listeners ref IPC channels
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
DiegoRBaquero authored and jasnell committed Mar 7, 2017
1 parent d481996 commit 4af3da9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/api/child_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()`][]

Expand Down

0 comments on commit 4af3da9

Please sign in to comment.