diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 03dbf7df5ab111..f001ee3c7605f7 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -1403,16 +1403,9 @@ const { spawn } = require('child_process'); const subprocess = spawn('ls'); -const ioStdout = subprocess.stdio[1]; - -// This is the same of listening to ioStdout data event subprocess.stdout.on('data', (data) => { console.log(`Received chunk ${data}`); }); - -ioStdout.on('data', (data) => { - console.log(`Received chunk ${data}`); -}); ``` ### subprocess.unref()