Skip to content

Commit

Permalink
doc: clarify subprocess.stdout/in/err property
Browse files Browse the repository at this point in the history
PR-URL: nodejs/node#43910
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
  • Loading branch information
cola119 authored and guangwong committed Oct 10, 2022
1 parent 490e229 commit 05b6b87
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions doc/api/child_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -1639,7 +1639,7 @@ in which the child process is launched.
added: v0.1.90
-->

* {stream.Readable}
* {stream.Readable|null|undefined}

A `Readable Stream` that represents the child process's `stderr`.

Expand All @@ -1649,16 +1649,16 @@ 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.
The `subprocess.stderr` property can be `null` or `undefined`
if the child process could not be successfully spawned.

### `subprocess.stdin`

<!-- YAML
added: v0.1.90
-->

* {stream.Writable}
* {stream.Writable|null|undefined}

A `Writable Stream` that represents the child process's `stdin`.

Expand All @@ -1671,8 +1671,8 @@ 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.
The `subprocess.stdin` property can be `null` or `undefined`
if the child process could not be successfully spawned.

### `subprocess.stdio`

Expand Down Expand Up @@ -1724,7 +1724,7 @@ not be successfully spawned.
added: v0.1.90
-->

* {stream.Readable}
* {stream.Readable|null|undefined}

A `Readable Stream` that represents the child process's `stdout`.

Expand All @@ -1744,8 +1744,8 @@ subprocess.stdout.on('data', (data) => {
});
```

The `subprocess.stdout` property can be `null` if the child process could
not be successfully spawned.
The `subprocess.stdout` property can be `null` or `undefined`
if the child process could not be successfully spawned.

### `subprocess.unref()`

Expand Down

0 comments on commit 05b6b87

Please sign in to comment.