Skip to content

doc: improve options.stdio section for child_process.spawn()

Rodrigo Muino Tomonari requested to merge github/fork/ryansobol/stdio into master

The current options.stdio section for the child_process.spawn() function is muddled and confusing. I can never remember how all the options work and, in the past, have had to resort to reading the source and googling for a working example.

This pull request aims to fix that. The introduction attempts to give meaning to options.stdio by briefly explaining what the standard streams are, why they're useful, and how to configure them. It also addresses the various ways to configure options.stdio at a high-level.

Following the introduction is a medium-level reference for each configuration option. Each option has it's own section that contains two components.

  1. Enough to information to understand the concept.
  2. A working example to get started.

I believe these changes are an improvement because it organizes all the necessary information and gotchas into logical buckets. Hopefully, after being reviewed by the community, this PR can be accepted so we never have to look anywhere else to remember how options.stdio works.

BTW - Here's a handy link for reviewing the improved options.stdio section as an end-user.

Merge request reports

Loading