Skip to content

Commit c1ea23c

Browse files
jasnelltargos
authored andcommittedMay 1, 2021
doc: clarify subprocess.stdout/in/err/io properties
The various `subprocess.stdwhatever` properties can be null or undefined in certain conditions. Fixes: #33458 Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #36784 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 19e6120 commit c1ea23c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 

‎doc/api/child_process.md

+12
Original file line numberDiff line numberDiff line change
@@ -1498,6 +1498,9 @@ then this will be `null`.
14981498
`subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will
14991499
refer to the same value.
15001500

1501+
The `subprocess.stderr` property can be `null` if the child process could
1502+
not be successfully spawned.
1503+
15011504
### `subprocess.stdin`
15021505
<!-- YAML
15031506
added: v0.1.90
@@ -1516,6 +1519,9 @@ then this will be `null`.
15161519
`subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will
15171520
refer to the same value.
15181521

1522+
The `subprocess.stdin` property can be `undefined` if the child process could
1523+
not be successfully spawned.
1524+
15191525
### `subprocess.stdio`
15201526
<!-- YAML
15211527
added: v0.7.10
@@ -1556,6 +1562,9 @@ assert.strictEqual(subprocess.stdio[2], null);
15561562
assert.strictEqual(subprocess.stdio[2], subprocess.stderr);
15571563
```
15581564

1565+
The `subprocess.stdio` property can be `undefined` if the child process could
1566+
not be successfully spawned.
1567+
15591568
### `subprocess.stdout`
15601569
<!-- YAML
15611570
added: v0.1.90
@@ -1581,6 +1590,9 @@ subprocess.stdout.on('data', (data) => {
15811590
});
15821591
```
15831592

1593+
The `subprocess.stdout` property can be `null` if the child process could
1594+
not be successfully spawned.
1595+
15841596
### `subprocess.unref()`
15851597
<!-- YAML
15861598
added: v0.7.10

0 commit comments

Comments
 (0)
Please sign in to comment.