We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fbefc4 commit 0df3ea0Copy full SHA for 0df3ea0
doc/api/child_process.md
@@ -1398,6 +1398,16 @@ then this will be `null`.
1398
`subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will
1399
refer to the same value.
1400
1401
+```js
1402
+const { spawn } = require('child_process');
1403
+
1404
+const subprocess = spawn('ls');
1405
1406
+subprocess.stdout.on('data', (data) => {
1407
+ console.log(`Received chunk ${data}`);
1408
+});
1409
+```
1410
1411
### subprocess.unref()
1412
<!-- YAML
1413
added: v0.7.10
0 commit comments