diff options
author | Matthew Francis Brunetti <zenflow87@gmail.com> | 2021-03-20 12:14:04 +0300 |
---|---|---|
committer | Ruy Adorno <ruyadorno@hotmail.com> | 2021-03-24 04:15:11 +0300 |
commit | c0a424f3e971287b4484dd24e4606a7a8ad74a75 (patch) | |
tree | f176f460a07136429cd8986722a601bf6bbcfa52 | |
parent | 9557dda2eb44482f693974032ba41f77fba548e9 (diff) |
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 <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
-rw-r--r-- | doc/api/child_process.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 77467cc6573..aace7566e49 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -1162,6 +1162,8 @@ added: v15.1.0 --> 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`. |