Skip to content

doc: clarify child_process close event

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 (closed)

Merge request reports

Loading