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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: clarify child_process close event #38181

Closed
wants to merge 2 commits into from

Conversation

Linkgoron
Copy link
Member

@Linkgoron Linkgoron commented Apr 10, 2021

Clarify the 'close' event description in the child_process docs.

This event is a bit confusing, as the documentation did not state that:

  • It's supposed to get emitted after "exit" was already emitted.
  • It also emits when the child_process has failed to spawn (and thus, exit will never be emitted). Another detail, that I did not add to the docs, is that in this case the exit code passed to the closed handler is negative. Should this be mentioned?

fixes: #37998

clarify the 'close' event description in the child_process docs.

fixes: nodejs#37998
@nodejs-github-bot nodejs-github-bot added child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to the documentations. labels Apr 10, 2021
Copy link
Member

@benjamingr benjamingr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Linkgoron Linkgoron added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 10, 2021
@jasnell
Copy link
Member

jasnell commented Apr 12, 2021

Landed in 474fbb5

@jasnell jasnell closed this Apr 12, 2021
jasnell pushed a commit that referenced this pull request Apr 12, 2021
clarify the 'close' event description in the child_process docs.

fixes: #37998

PR-URL: #38181
Fixes: #37998
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
BethGriggs pushed a commit that referenced this pull request Apr 15, 2021
clarify the 'close' event description in the child_process docs.

fixes: #37998

PR-URL: #38181
Fixes: #37998
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request May 1, 2021
clarify the 'close' event description in the child_process docs.

fixes: #37998

PR-URL: #38181
Fixes: #37998
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@danielleadams danielleadams mentioned this pull request May 3, 2021
danielleadams pushed a commit that referenced this pull request May 8, 2021
clarify the 'close' event description in the child_process docs.

fixes: #37998

PR-URL: #38181
Fixes: #37998
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. 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 this pull request may close these issues.

child_process 'close' always (?) emitted after 'exit'
6 participants