// workaround for tty output truncation upon process.exit()varexit=process.exit;process.exit=function(){varargs=[].slice.call(arguments);process.once("uncaughtException",function(){(functioncallback(){if(process.stdout.bufferSize||process.stderr.bufferSize){setImmediate(callback);}else{exit.apply(process,args);}})();});throwexit;};