Browse Source

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>
v6
Diego Rodríguez Baquero 8 years ago
committed by Sam Roberts
parent
commit
6eb614adc8
  1. 6
      doc/api/child_process.md

6
doc/api/child_process.md

@ -572,9 +572,9 @@ spawn('prg', [], { stdio: ['pipe', null, null, null, 'pipe'] });
*It is worth noting that when an IPC channel is established between the *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 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 is launched with the IPC channel unreferenced (using `unref()`) until the
child registers an event handler for the [`process.on('disconnect')`][] event. child registers an event handler for the [`process.on('disconnect')`][] event
This allows the child to exit normally without the process being held open or the [`process.on('message')`][] event.This allows the child to exit normally
by the open IPC channel.* without the process being held open by the open IPC channel.*
See also: [`child_process.exec()`][] and [`child_process.fork()`][] See also: [`child_process.exec()`][] and [`child_process.fork()`][]

Loading…
Cancel
Save