summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/internal/process/warning.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/internal/process/warning.js b/lib/internal/process/warning.js
index 698e73d97f..9416f15383 100644
--- a/lib/internal/process/warning.js
+++ b/lib/internal/process/warning.js
@@ -29,7 +29,9 @@ function writeOut(message) {
function onClose(fd) {
return () => {
if (fs === null) fs = require('fs');
- fs.close(fd, nop);
+ try {
+ fs.closeSync(fd);
+ } catch {}
};
}