From b31bb72c10a303fff4682ac60a99f997f16ee53a Mon Sep 17 00:00:00 2001 From: Matthew Francis Brunetti Date: Sat, 20 Mar 2021 05:14:04 -0400 Subject: [PATCH] doc: clarify when child process 'spawn' event is *not* emitted Making this clarification in response to a comment on GitHub: https://github.com/nodejs/node/issues/35288#issuecomment-802811813 PR-URL: https://github.com/nodejs/node/pull/37833 Reviewed-By: Colin Ihrig Reviewed-By: Benjamin Gruenbaum Reviewed-By: James M Snell --- doc/api/child_process.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 5f744729de4ee6..54aea5abbef15b 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -1088,6 +1088,8 @@ added: REPLACEME --> The `'spawn'` event is emitted once the child process has spawned successfully. +If the child process does not spawn successfully, the `'spawn'` event is not +emitted and the `'error'` event is emitted instead. If emitted, the `'spawn'` event comes before all other events and before any data is received via `stdout` or `stderr`.