|Did you know ...||Search Documentation:|
on_signal(Signal, Current, Current).
The action description is an atom denoting the name of the predicate that will be called if Signal arrives. on_signal/3 is a meta-predicate, which implies that <Module>:<Name> refers to <Name>/1 in module <Module>. The handler is called with a single argument: the name of the signal as an atom. The Prolog names for signals are explained below.
Two predicate names have special meaning.
Prolog will map the signal onto a Prolog exception as described in
resets the handler to the settings active before SWI-Prolog manipulated
Signals bound to a foreign function through PL_signal()
are reported using the term
After receiving a signal mapped to
throw, the exception
raised has the following structure:
error(signal(<SigName>, <SigNum>), <Context>)
The signal names are defined by the POSIX standard as symbols of the
SIG<SIGNAME>. The Prolog name for a
signal is the lowercase version of <SIGNAME>. The
may be used to map between names and signals.
Initially, some signals are mapped to
throw, while all
other signals are
default. The following signals throw an