版博士V2.0程序
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

23 righe
758 B

  1. // workaround for tty output truncation on Node.js
  2. try {
  3. // prevent buffer overflow and other asynchronous bugs
  4. process.stdout._handle.setBlocking(true);
  5. process.stderr._handle.setBlocking(true);
  6. } catch (e) {
  7. // ensure output buffers are flushed before process termination
  8. var exit = process.exit;
  9. process.exit = function() {
  10. var args = [].slice.call(arguments);
  11. process.once("uncaughtException", function() {
  12. (function callback() {
  13. if (process.stdout.bufferSize || process.stderr.bufferSize) {
  14. setTimeout(callback, 1);
  15. } else {
  16. exit.apply(process, args);
  17. }
  18. })();
  19. });
  20. throw exit;
  21. };
  22. }