mirror of
https://github.com/wassname/phaser.git
synced 2026-06-30 16:40:20 +08:00
27 lines
627 B
JavaScript
27 lines
627 B
JavaScript
/*
|
|
* grunt
|
|
* http://gruntjs.com/
|
|
*
|
|
* Copyright (c) 2013 "Cowboy" Ben Alman
|
|
* Licensed under the MIT license.
|
|
* https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
// This seems to be required in Windows (as of Node.js 0.8.7) to ensure that
|
|
// stdout/stderr are flushed before the process exits.
|
|
|
|
// https://gist.github.com/3427148
|
|
// https://gist.github.com/3427357
|
|
|
|
exports.exit = function exit(exitCode) {
|
|
if (process.stdout._pendingWriteReqs || process.stderr._pendingWriteReqs) {
|
|
process.nextTick(function() {
|
|
exit(exitCode);
|
|
});
|
|
} else {
|
|
process.exit(exitCode);
|
|
}
|
|
};
|