You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415
  1. // workaround for tty output truncation upon process.exit()
  2. var exit = process.exit;
  3. process.exit = function() {
  4. var args = [].slice.call(arguments);
  5. process.once("uncaughtException", function() {
  6. (function callback() {
  7. if (process.stdout.bufferSize || process.stderr.bufferSize) {
  8. setImmediate(callback);
  9. } else {
  10. exit.apply(process, args);
  11. }
  12. })();
  13. });
  14. throw exit;
  15. };