| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 18c4e5e commit 0649148
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,10 +26,16 @@ ls.on('close', (code) => { | |||
| 26 | 26 | ``` | |
| 27 | 27 | ||
| 28 | 28 | By default, pipes for `stdin`, `stdout`, and `stderr` are established between | |
| 29 | - the parent Node.js process and the spawned child. It is possible to stream data | ||
| 30 | - through these pipes in a non-blocking way. *Note, however, that some programs | ||
| 31 | - use line-buffered I/O internally. While that does not affect Node.js, it can | ||
| 32 | - mean that data sent to the child process may not be immediately consumed.* | ||
| 29 | + the parent Node.js process and the spawned child. These pipes have | ||
| 30 | + limited (and platform-specific) capacity. If the child process writes to | ||
| 31 | + stdout in excess of that limit without the output being captured, the child | ||
| 32 | + process will block waiting for the pipe buffer to accept more data. This is | ||
| 33 | + identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }` | ||
| 34 | + option if the output will not be consumed. | ||
| 35 | + It is possible to stream data through these pipes in a non-blocking way. Note, | ||
| 36 | + however, that some programs use line-buffered I/O internally. While that does | ||
| 37 | + not affect Node.js, it can mean that data sent to the child process may not be | ||
| 38 | + immediately consumed. | ||
| 33 | 39 | ||
| 34 | 40 | The [`child_process.spawn()`][] method spawns the child process asynchronously, | |
| 35 | 41 | without blocking the Node.js event loop. The [`child_process.spawnSync()`][] | |
| Back | FazBrowse Home | New Git URL |
0 commit comments