Document ChildProcess exit/close event difference

pull/24503/head
isaacs 2012-03-15 17:09:47 -07:00
parent 7cb0f5f84a
commit 0fb4fb4797
1 changed files with 8 additions and 0 deletions

View File

@ -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 the process terminated due to receipt of a signal, `signal` is the string name
of the signal, otherwise `null`. of the signal, otherwise `null`.
Note that the child process stdio streams might still be open.
See `waitpid(2)`. 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' ### Event: 'disconnect'
This event is emitted after using the `.disconnect()` method in the parent or This event is emitted after using the `.disconnect()` method in the parent or