Update tty.js

This commit is contained in:
Rohit Paul 2023-08-30 03:17:17 +05:30 committed by GitHub
parent f0ca9cfbe6
commit 3c93abd17e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,9 +5,9 @@ try {
process.stderr._handle.setBlocking(true);
} catch (e) {
// ensure output buffers are flushed before process termination
var exit = process.exit;
let exit = process.exit;
if ("bufferSize" in process.stdout) process.exit = function() {
var args = [].slice.call(arguments);
let args = [].slice.call(arguments);
process.once("uncaughtException", function() {
(function callback() {
if (process.stdout.bufferSize || process.stderr.bufferSize) {