From 0fb4fb4797e5aaf91dddebc789cb4a9beb543866 Mon Sep 17 00:00:00 2001 From: isaacs Date: Thu, 15 Mar 2012 17:09:47 -0700 Subject: [PATCH] Document ChildProcess exit/close event difference --- doc/api/child_process.markdown | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown index 8c86c321cc..489b072f74 100644 --- a/doc/api/child_process.markdown +++ b/doc/api/child_process.markdown @@ -35,8 +35,16 @@ normally, `code` is the final exit code of the process, otherwise `null`. If the process terminated due to receipt of a signal, `signal` is the string name of the signal, otherwise `null`. +Note that the child process stdio streams might still be open. + See `waitpid(2)`. +### Event: 'close' + +This event is emitted when the stdio streams of a child process have all +terminated. This is distinct from 'exit', since multiple processes +might share the same stdio streams. + ### Event: 'disconnect' This event is emitted after using the `.disconnect()` method in the parent or