pub fn emit_before_exit(code: i32) -> Result<bool, String>Expand description
Emit process.on('beforeExit', code). Node fires this when the loop has
drained but the process has NOT been told to exit, and — unlike exit —
work scheduled from a handler is honoured, so the loop runs again and
beforeExit can fire repeatedly. It never fires after an explicit
process.exit() or an uncaught exception.
Reports whether any listener ran, so the caller knows to re-drain.