Skip to content

Commit d4bcb36

Browse files
jasnelldanielleadams
authored andcommitted
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 <[email protected]> PR-URL: #36784 Reviewed-By: Luigi Pinca <[email protected]>
1 parent 4e4deca commit d4bcb36

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
@@ -1508,6 +1508,9 @@ then this will be `null`.
15081508
`subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will
15091509
refer to the same value.
15101510

1511+
The `subprocess.stderr` property can be `null` if the child process could
1512+
not be successfully spawned.
1513+
15111514
### `subprocess.stdin`
15121515
<!-- YAML
15131516
added: v0.1.90
@@ -1526,6 +1529,9 @@ then this will be `null`.
15261529
`subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will
15271530
refer to the same value.
15281531

1532+
The `subprocess.stdin` property can be `undefined` if the child process could
1533+
not be successfully spawned.
1534+
15291535
### `subprocess.stdio`
15301536
<!-- YAML
15311537
added: v0.7.10
@@ -1566,6 +1572,9 @@ assert.strictEqual(subprocess.stdio[2], null);
15661572
assert.strictEqual(subprocess.stdio[2], subprocess.stderr);
15671573
```
15681574

1575+
The `subprocess.stdio` property can be `undefined` if the child process could
1576+
not be successfully spawned.
1577+
15691578
### `subprocess.stdout`
15701579
<!-- YAML
15711580
added: v0.1.90
@@ -1591,6 +1600,9 @@ subprocess.stdout.on('data', (data) => {
15911600
});
15921601
```
15931602

1603+
The `subprocess.stdout` property can be `null` if the child process could
1604+
not be successfully spawned.
1605+
15941606
### `subprocess.unref()`
15951607
<!-- YAML
15961608
added: v0.7.10

0 commit comments

Comments
 (0)