Hmm, I'm not sure this is the right exit code in all cases. It seems ok if `!this.process`, although it might be better to return the undefined value or NaN to make it clear that there was no exit code. But if `this.shuttingDown`, then I imagine that the caller will want the function to wait until the process finishes shutting down to resolve the promise, and it'll want to know the actual error code that was returned. So I would register an *exit* handler in that case and resolve the promise in that handler.