joyent/node — pull request #4515 by glasser (2013-01-03 17:38:29+00:00)
Title: Use close event instead of exit in child_process example.

Node doesn't guarantee that all the data will be read from the 'ps' before its
'exit' event is called, so the example is misleading.

(I suppose this really should be rewritten to use streams2, but this is at least an incremental improvement. I found a real bug in my code today that was modeled after this example and assuming that 'exit' came after all stdout 'data'.)