process global, including the process.on() method for listening to OS signals.
To run code when the process exits, listen for the
"beforeExit" event, emitted when the event loop empties, and the "exit" event, emitted when the event loop empties or process.exit() is called. Neither event is emitted when the process is killed by a signal it has no listener for. To run cleanup on a signal, listen for that signal and call process.exit() from the listener.
See Utils for more utilities.