Did you know ... | Search Documentation: |
Predicate halt/1 |
unwind(halt(Status)
)
. Currently,
this is used when halt/1
is called in the main
thread and there is no intermediate C
function on the stack that called PL_next_solution()
without the PL_Q_PASS_EXCEPTION
flag. Future versions may
also use signal based exit from threads.
After the exception bubbled up to the top or if the halt exeption could not be raised, system termination starts. System termination (see also PL_halt()) preforms the following steps:
unwind(halt(Status)
)
in all running
threads.
halt/1
has been extended in SWI-Prolog to accept the arg abort
.
This performs as halt/1
above except that:
In addition to an integer status name we also allow passing a
signal name. This is similar to abort
, blocking
halt cancellation and set the termination code to 128+signum. For
example, using halt(term)
the system exits with status 143
(= 128+15) on Linux.