Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: improve child process synchronous API docs #39306

Closed
1 task done
evanshortiss opened this issue Jul 8, 2021 · 2 comments 路 Fixed by #39412
Closed
1 task done

doc: improve child process synchronous API docs #39306

evanshortiss opened this issue Jul 8, 2021 · 2 comments 路 Fixed by #39412
Labels
child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to the documentations.

Comments

@evanshortiss
Copy link
Contributor

馃摋 API Reference Docs Problem

  • Version: 14+
  • Platform: N/A
  • Subsystem: Child Process

Location

Section of the site where the content exists

Affected URL(s):

Description

Concise explanation of the problem

I'd like to suggest the following improvements to synchronous child process docs:

  • The options.stdio argument should provide a link to the docs for that option (this is under the async spawn doc)
  • Basic usage example(s)
  • Exception handling example to demonstrate:
    • That stderr and stdio are attached to the error raised if a child exits with a none-zero code
    • That stderr and stdio are not attached to the error if options.stdio is set to ignore etc.

  • I would like to work on this issue and
    submit a pull request.
@evanshortiss evanshortiss added the doc Issues and PRs related to the documentations. label Jul 8, 2021
@gireeshpunathil gireeshpunathil added the child_process Issues and PRs related to the child_process subsystem. label Jul 11, 2021
@gireeshpunathil
Copy link
Member

@evanshortiss - thanks, looks good to me! go ahead with your plan on a PR!

@evanshortiss
Copy link
Contributor Author

@gireeshpunathil thank you! Will aim to get something drafted within 2 weeks.

evanshortiss added a commit to evanshortiss/node that referenced this issue Jul 16, 2021
Added an example to the execFileSync method. This demonstrates how to
handle exceptions and access the stderr and stdio properties that are
attached to the Error object in a catch block.

Added a link to the detailed stdio section nested under
child_process.spawn() from each child_process sync method option
description.

Fixes: nodejs#39306
nodejs-github-bot pushed a commit that referenced this issue May 12, 2024
Added an example to the `execFileSync` method. This demonstrates how to
handle exceptions and access the stderr and stdio properties that are
attached to the `Error` object in a `catch` block.

Added a link to the detailed stdio section nested under
`child_process.spawn()` from each child_process sync method option
description.

Fixes: #39306
PR-URL: #39412
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
targos pushed a commit that referenced this issue May 12, 2024
Added an example to the `execFileSync` method. This demonstrates how to
handle exceptions and access the stderr and stdio properties that are
attached to the `Error` object in a `catch` block.

Added a link to the detailed stdio section nested under
`child_process.spawn()` from each child_process sync method option
description.

Fixes: #39306
PR-URL: #39412
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
lukins-cz pushed a commit to lukins-cz/OS-Aplet-node that referenced this issue Jun 1, 2024
Added an example to the `execFileSync` method. This demonstrates how to
handle exceptions and access the stderr and stdio properties that are
attached to the `Error` object in a `catch` block.

Added a link to the detailed stdio section nested under
`child_process.spawn()` from each child_process sync method option
description.

Fixes: nodejs#39306
PR-URL: nodejs#39412
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants