summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Unnebäck <linus@folkdatorn.se>2013-11-21 16:39:23 +0100
committerBen Noordhuis <info@bnoordhuis.nl>2013-11-23 15:46:50 +0100
commit953d7184ec95813f40916b40892db3150daf615f (patch)
treebe6fdd073652fa346bcf18c2e5f4f5dacd71e14d
parent71aabedad422748e67d1aab18742d03b829d95c9 (diff)
downloadnode-953d7184ec95813f40916b40892db3150daf615f.tar.gz
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.
-rw-r--r--doc/api/child_process.markdown4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown
index d21f7db3e..40cd18352 100644
--- a/doc/api/child_process.markdown
+++ b/doc/api/child_process.markdown
@@ -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).