Eagerly set process.exitCode (#2820)
Eagerly set process.exitCode (#2820)

To workaround process being terminated earlier than expected.

Simpler version of PR #2714 which only eagerly sets the exitcode without playing with the draining semantics.
JohnnyEstilles/mocha,adamgruber/mocha,JohnnyEstilles/mocha,adamgruber/mocha,adamgruber/mocha,hoverduck/mocha,igwejk/mocha,JohnnyEstilles/mocha,hoverduck/mocha,mochajs/mocha,hoverduck/mocha,mochajs/mocha,igwejk/mocha,outsideris/mocha,outsideris/mocha,boneskull/mocha,boneskull/mocha,mochajs/mocha,hoverduck/mocha,boneskull/mocha