summaryrefslogtreecommitdiff
path: root/doc/api/child_process.md
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2018-02-05 21:55:16 -0800
committerAnatoli Papirovski <apapirovski@mac.com>2018-02-08 11:57:14 -0500
commitd3569b623ccd593c9ef62fcaf0aba2711dc7fbfa (patch)
tree643d44f1eb33c9b822fea7742d2691355d295a4c /doc/api/child_process.md
parent809af1fe8a0a096be4f0a3020f8e60ee1c827cbc (diff)
downloadandroid-node-v8-d3569b623ccd593c9ef62fcaf0aba2711dc7fbfa.tar.gz
android-node-v8-d3569b623ccd593c9ef62fcaf0aba2711dc7fbfa.tar.bz2
android-node-v8-d3569b623ccd593c9ef62fcaf0aba2711dc7fbfa.zip
doc: remove **Note:** tags
Remove the various **Note:** prefixes throughout the docs. PR-URL: https://github.com/nodejs/node/pull/18592 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'doc/api/child_process.md')
-rw-r--r--doc/api/child_process.md68
1 files changed, 33 insertions, 35 deletions
diff --git a/doc/api/child_process.md b/doc/api/child_process.md
index 715eb9d269..768eb91a83 100644
--- a/doc/api/child_process.md
+++ b/doc/api/child_process.md
@@ -170,9 +170,8 @@ exec('echo "The \\$HOME variable is $HOME"');
//The $HOME variable is escaped in the first instance, but not in the second
```
-*Note*: Never pass unsanitized user input to this function. Any input
-containing shell metacharacters may be used to trigger arbitrary command
-execution.
+**Never pass unsanitized user input to this function. Any input containing shell
+metacharacters may be used to trigger arbitrary command execution.**
```js
const { exec } = require('child_process');
@@ -218,8 +217,8 @@ If `timeout` is greater than `0`, the parent will send the signal
identified by the `killSignal` property (the default is `'SIGTERM'`) if the
child runs longer than `timeout` milliseconds.
-*Note*: Unlike the exec(3) POSIX system call, `child_process.exec()` does not
-replace the existing process and uses a shell to execute the command.
+Unlike the exec(3) POSIX system call, `child_process.exec()` does not replace
+the existing process and uses a shell to execute the command.
If this method is invoked as its [`util.promisify()`][]ed version, it returns
a Promise for an object with `stdout` and `stderr` properties. In case of an
@@ -316,9 +315,9 @@ async function getVersion() {
getVersion();
```
-*Note*: If the `shell` option is enabled, do not pass unsanitized user input
-to this function. Any input containing shell metacharacters may be used to
-trigger arbitrary command execution.
+**If the `shell` option is enabled, do not pass unsanitized user input to this
+function. Any input containing shell metacharacters may be used to trigger
+arbitrary command execution.**
### child_process.fork(modulePath[, args][, options])
<!-- YAML
@@ -376,11 +375,11 @@ 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.
-*Note*: Unlike the fork(2) POSIX system call, `child_process.fork()` does
-not clone the current process.
+Unlike the fork(2) POSIX system call, `child_process.fork()` does not clone the
+current process.
-*Note*: The `shell` option available in [`child_process.spawn()`][] is not
-supported by `child_process.fork()` and will be ignored if set.
+The `shell` option available in [`child_process.spawn()`][] is not supported by
+`child_process.fork()` and will be ignored if set.
### child_process.spawn(command[, args][, options])
<!-- YAML
@@ -426,9 +425,9 @@ The `child_process.spawn()` method spawns a new process using the given
`command`, with command line arguments in `args`. If omitted, `args` defaults
to an empty array.
-*Note*: If the `shell` option is enabled, do not pass unsanitized user input to
-this function. Any input containing shell metacharacters may be used to
-trigger arbitrary command execution.
+**If the `shell` option is enabled, do not pass unsanitized user input to this
+function. Any input containing shell metacharacters may be used to trigger
+arbitrary command execution.**
A third argument may be used to specify additional options, with these defaults:
@@ -517,12 +516,12 @@ subprocess.on('error', (err) => {
});
```
-*Note*: Certain platforms (macOS, Linux) will use the value of `argv[0]` for
-the process title while others (Windows, SunOS) will use `command`.
+Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process
+title while others (Windows, SunOS) will use `command`.
-*Note*: Node.js currently overwrites `argv[0]` with `process.execPath` on
-startup, so `process.argv[0]` in a Node.js child process will not match the
-`argv0` parameter passed to `spawn` from the parent, retrieve it with the
+Node.js currently overwrites `argv[0]` with `process.execPath` on startup, so
+`process.argv[0]` in a Node.js child process will not match the `argv0`
+parameter passed to `spawn` from the parent, retrieve it with the
`process.argv0` property instead.
#### options.detached
@@ -725,7 +724,7 @@ until the child process has fully closed. When a timeout has been encountered
and `killSignal` is sent, the method won't return until the process has
completely exited.
-*Note*: If the child process intercepts and handles the `SIGTERM` signal and
+If the child process intercepts and handles the `SIGTERM` signal and
does not exit, the parent process will still wait until the child process has
exited.
@@ -733,9 +732,9 @@ If the process times out or has a non-zero exit code, this method ***will***
throw an [`Error`][] that will include the full result of the underlying
[`child_process.spawnSync()`][].
-*Note*: If the `shell` option is enabled, do not pass unsanitized user input
-to this function. Any input containing shell metacharacters may be used to
-trigger arbitrary command execution.
+**If the `shell` option is enabled, do not pass unsanitized user input to this
+function. Any input containing shell metacharacters may be used to trigger
+arbitrary command execution.**
### child_process.execSync(command[, options])
<!-- YAML
@@ -789,9 +788,8 @@ If the process times out or has a non-zero exit code, this method ***will***
throw. The [`Error`][] object will contain the entire result from
[`child_process.spawnSync()`][]
-*Note*: Never pass unsanitized user input to this function. Any input
-containing shell metacharacters may be used to trigger arbitrary command
-execution.
+**Never pass unsanitized user input to this function. Any input containing shell
+metacharacters may be used to trigger arbitrary command execution.**
### child_process.spawnSync(command[, args][, options])
<!-- YAML
@@ -857,9 +855,9 @@ completely exited. Note that if the process intercepts and handles the
`SIGTERM` signal and doesn't exit, the parent process will wait until the child
process has exited.
-*Note*: If the `shell` option is enabled, do not pass unsanitized user input
-to this function. Any input containing shell metacharacters may be used to
-trigger arbitrary command execution.
+**If the `shell` option is enabled, do not pass unsanitized user input to this
+function. Any input containing shell metacharacters may be used to trigger
+arbitrary command execution.**
## Class: ChildProcess
<!-- YAML
@@ -907,9 +905,9 @@ The `'error'` event is emitted whenever:
2. The process could not be killed, or
3. Sending a message to the child process failed.
-*Note*: The `'exit'` event may or may not fire after an error has occurred.
-When listening to both the `'exit'` and `'error'` events, it is important
-to guard against accidentally invoking handler functions multiple times.
+The `'exit'` event may or may not fire after an error has occurred. When
+listening to both the `'exit'` and `'error'` events, it is important to guard
+against accidentally invoking handler functions multiple times.
See also [`subprocess.kill()`][] and [`subprocess.send()`][].
@@ -948,7 +946,7 @@ added: v0.5.9
The `'message'` event is triggered when a child process uses [`process.send()`][]
to send messages.
-*Note*: The message goes through serialization and parsing. The resulting
+The message goes through serialization and parsing. The resulting
message might not be the same as what is originally sent.
### subprocess.channel
@@ -1111,7 +1109,7 @@ 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 serialization and parsing. The resulting
+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: