Availability:C-language interface function
bool PL_halt(int
status)Terminate the Prolog process as halt/1.
The status is used to set the return code from calling exit()
- this is a value between 0 and 65535. Additional behaviour can be
specified by OR-ing the status with these flags:
- PL_HALT_WITH_EXCEPTION
- When specified, try to raise
unwind(halt(status)).
If this is not possible, ignore this flag. Return false.
- PL_CLEANUP_NO_RECLAIM_MEMORY
- Never reclaim the memory, leaving this task to the OS. This is the
default unless the system is compiled for debugging.
- PL_CLEANUP_NO_CANCEL
- Do not allow hooks to cancel halting the system.
Unless PL_HALT_WITH_EXCEPTION was specified and
effective, Clean up the Prolog environment using PL_cleanup()
and if successful call exit() with the status argument. Returns true
if exit was cancelled by PL_cleanup().240Versions
up to 9.3.12 returned false on cancel. If necessary, the
two behaviours can be distinguished based on the existence of the PL_HALT_WITH_EXCEPTION
macro.