Registers a callback executed when the process exits normally.
Example:
ShutdownHooks.addHook (() => { print ("cleanup\n"); });
callback to execute at process shutdown.