Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: remove IPC channel implementation details #17460

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions doc/api/child_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,7 @@ By default, `child_process.fork()` will spawn new Node.js instances using the

Node.js processes launched with a custom `execPath` will communicate with the
parent process using the file descriptor (fd) identified using the
environment variable `NODE_CHANNEL_FD` on the child process. The input and
output on this fd is expected to be line delimited JSON objects.
environment variable `NODE_CHANNEL_FD` on the child process.

*Note*: Unlike the fork(2) POSIX system call, `child_process.fork()` does
not clone the current process.
Expand Down Expand Up @@ -609,9 +608,7 @@ pipes between the parent and child. The value is one of the following:
2. `'ipc'` - Create an IPC channel for passing messages/file descriptors
between parent and child. A [`ChildProcess`][] may have at most *one* IPC stdio
file descriptor. Setting this option enables the [`subprocess.send()`][]
method. If the child writes JSON messages to this file descriptor, the
[`subprocess.on('message')`][`'message'`] event handler will be triggered in
the parent. If the child is a Node.js process, the presence of an IPC channel
method. If the child is a Node.js process, the presence of an IPC channel
will enable [`process.send()`][], [`process.disconnect()`][],
[`process.on('disconnect')`][], and [`process.on('message')`] within the
child.
Expand Down Expand Up @@ -933,9 +930,8 @@ added: v0.5.9
The `'message'` event is triggered when a child process uses [`process.send()`][]
to send messages.

*Note*: The message goes through JSON serialization and parsing. The resulting
message might not be the same as what is originally sent. See notes in
[the `JSON.stringify()` specification][`JSON.stringify` spec].
*Note*: The message goes through serialization and parsing. The resulting
message might not be the same as what is originally sent.

### subprocess.channel
<!-- YAML
Expand Down Expand Up @@ -1097,9 +1093,8 @@ be used to send messages to the child process. When the child process is a
Node.js instance, these messages can be received via the
[`process.on('message')`][] event.

*Note*: The message goes through JSON serialization and parsing. The resulting
message might not be the same as what is originally sent. See notes in
[the `JSON.stringify()` specification][`JSON.stringify` spec].
*Note*: The message goes through serialization and parsing. The resulting
message might not be the same as what is originally sent.

For example, in the parent script:

Expand Down Expand Up @@ -1369,7 +1364,6 @@ unavailable.
[`ChildProcess`]: #child_process_child_process
[`Error`]: errors.html#errors_class_error
[`EventEmitter`]: events.html#events_class_eventemitter
[`JSON.stringify` spec]: https://tc39.github.io/ecma262/#sec-json.stringify
[`subprocess.connected`]: #child_process_subprocess_connected
[`subprocess.disconnect()`]: #child_process_subprocess_disconnect
[`subprocess.kill()`]: #child_process_subprocess_kill_signal
Expand Down
11 changes: 4 additions & 7 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@ The listener callback is invoked with the following arguments:
* `sendHandle` {Handle object} a [`net.Socket`][] or [`net.Server`][] object, or
undefined.

*Note*: The message goes through JSON serialization and parsing. The resulting
message might not be the same as what is originally sent. See notes in
[the `JSON.stringify()` specification][`JSON.stringify` spec].
*Note*: The message goes through serialization and parsing. The resulting
message might not be the same as what is originally sent.

### Event: 'rejectionHandled'
<!-- YAML
Expand Down Expand Up @@ -1519,9 +1518,8 @@ used to send messages to the parent process. Messages will be received as a
If Node.js was not spawned with an IPC channel, `process.send()` will be
`undefined`.

*Note*: The message goes through JSON serialization and parsing. The resulting
message might not be the same as what is originally sent. See notes in
[the `JSON.stringify()` specification][`JSON.stringify` spec].
*Note*: The message goes through serialization and parsing. The resulting
message might not be the same as what is originally sent.

## process.setegid(id)
<!-- YAML
Expand Down Expand Up @@ -1951,7 +1949,6 @@ cases:
[`ChildProcess`]: child_process.html#child_process_class_childprocess
[`Error`]: errors.html#errors_class_error
[`EventEmitter`]: events.html#events_class_eventemitter
[`JSON.stringify` spec]: https://tc39.github.io/ecma262/#sec-json.stringify
[`console.error()`]: console.html#console_console_error_data_args
[`console.log()`]: console.html#console_console_log_data_args
[`domain`]: domain.html
Expand Down