rax-maas / dreadnot

deploy without dread
Apache License 2.0
631 stars 61 forks source link

misc.spawn node 0.8 compatibility: stdio data may come after exit. #41

Closed dylanahsmith closed 11 years ago

dylanahsmith commented 11 years ago

child_process API changes between v0.6 and v0.8:

  • the 'exit' event is now emitted right after the child process exits. It no longer waits for all stdio pipes to be closed.
  • the 'close' event was added that has is emitted after the child has exited and all the stdio pipes are closed.

For node 0.8 compatibility, while keeping compatibility with older version of node, I used the stdio stream 'close' event to avoid losing any 'data' events that can occur after the child_process 'exit' event.

pquerna commented 11 years ago

+1, LGTM.

dispalt commented 11 years ago

Style nit: can you make things camelCase?

dylanahsmith commented 11 years ago

@ddispaltro I changed the naming to be camel case.

dispalt commented 11 years ago

Thanks!