Availability:built-in
at_halt(:Goal)Register Goal to be run from PL_cleanup(),
which is called when the system halts. The hooks are run in the reverse
order they were registered (FIFO). Success or failure executing a hook
is ignored. If the hook raises an exception this is printed using print_message/2.
An attempt to call halt/[0,1]
from a hook is ignored. Hooks may call
cancel_halt/1,
causing halt/0
and PL_halt(0)
to print a message indicating that halting the system has been
cancelled.