maxogden/dat — pull request #227 by shama (2014-12-02 19:49:53+00:00)
Title: cli: replace calls to process.exit with exit as Windows workaround

Ref: joyent/node#3584

On Windows, output isn't always flushed when exiting. This implements [exit](https://www.npmjs.org/package/exit) as a workaround to ensure output is flushed when exiting on Windows.

This fixes all but 3 tests on Windows. I'm still looking into those (looks like a pipe being destroyed early when ran via RPC):

![screen shot 2014-12-02 at 11 47 33 am](https://cloud.githubusercontent.com/assets/99604/5269620/2abf9048-7a19-11e4-9ef8-4fe1ee297ea3.png)