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