mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
doc: clarify subprocess.stdout/in/err/io properties
The various `subprocess.stdwhatever` properties can be null or undefined in certain conditions. Fixes: https://github.com/nodejs/node/issues/33458 Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/36784 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
4e4deca90d
commit
d4bcb3689d
1 file changed
+12
@@ -1508,6 +1508,9 @@ then this will be `null`.
|
||||
`subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will
|
||||
refer to the same value.
|
||||
|
||||
The `subprocess.stderr` property can be `null` if the child process could
|
||||
not be successfully spawned.
|
||||
|
||||
### `subprocess.stdin`
|
||||
<!-- YAML
|
||||
added: v0.1.90
|
||||
@@ -1526,6 +1529,9 @@ then this will be `null`.
|
||||
`subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will
|
||||
refer to the same value.
|
||||
|
||||
The `subprocess.stdin` property can be `undefined` if the child process could
|
||||
not be successfully spawned.
|
||||
|
||||
### `subprocess.stdio`
|
||||
<!-- YAML
|
||||
added: v0.7.10
|
||||
@@ -1566,6 +1572,9 @@ assert.strictEqual(subprocess.stdio[2], null);
|
||||
assert.strictEqual(subprocess.stdio[2], subprocess.stderr);
|
||||
```
|
||||
|
||||
The `subprocess.stdio` property can be `undefined` if the child process could
|
||||
not be successfully spawned.
|
||||
|
||||
### `subprocess.stdout`
|
||||
<!-- YAML
|
||||
added: v0.1.90
|
||||
@@ -1591,6 +1600,9 @@ subprocess.stdout.on('data', (data) => {
|
||||
});
|
||||
```
|
||||
|
||||
The `subprocess.stdout` property can be `null` if the child process could
|
||||
not be successfully spawned.
|
||||
|
||||
### `subprocess.unref()`
|
||||
<!-- YAML
|
||||
added: v0.7.10
|
||||
|
||||
Reference in new issue
Block a user