### Version v20.5.0 ### Platform macos ### Subsystem _No response_ ### What steps will reproduce the bug? ```js const repl = require('repl'); var r = repl.start({}); r.setupHistory(__dirname + '/history', () => { }); // Different results will occur here r.close(); ``` ### How often does it reproduce? Is there a required condition? _No response_ ### What is the expected behavior? Why is that the expected behavior? _No response_ ### What do you see instead? After calling setupHistory, the program continues to run even after the REPL is closed. ### Additional information _No response_