mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
doc: clarify child_process error behaviour
Clarify that an 'error' event may or may not be followed by an 'exit' event and that it's not safe to make assumptions either way.
This commit is contained in:
parent
71aabedad4
commit
953d7184ec
@ -36,6 +36,10 @@ Emitted when:
|
||||
2. The process could not be killed, or
|
||||
3. Sending a message to the child process failed for whatever reason.
|
||||
|
||||
Note that the `exit`-event may or may not fire after an error has occured. If
|
||||
you are listening on both events to fire a function, remember to guard against
|
||||
calling your function twice.
|
||||
|
||||
See also [`ChildProcess#kill()`](#child_process_child_kill_signal) and
|
||||
[`ChildProcess#send()`](#child_process_child_send_message_sendhandle).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user