jrburke/r.js — pull request #421 by Nemo157 (2013-04-02 05:22:43+00:00)
Title: Alternative solution to #196

Based off https://github.com/visionmedia/mocha/issues/333#issuecomment-7441955

Instead of synchronously writing to stdout/stderr wait for them to drain when exit is called.

Tested on node 0.8.7, 0.8.17, 0.10.2 on Windows 7 and it fixes problems with disappearing output when node is piped/redirected within powershell.