Availability:C-language interface function
pl_sigaction_t
is a struct
with the following definition:
typedef struct pl_sigaction { void (*sa_cfunction)(int); /* traditional C function */ predicate_t sa_predicate; /* call a predicate */ int sa_flags; /* additional flags */ } pl_sigaction_t;
The sa_flags
is a bitwise or of PLSIG_THROW
,
PLSIG_SYNC
and PLSIG_NOFRAME
. Signal handling
is enabled if PLSIG_THROW
is provided, sa_cfunction
or
sa_predicate
is provided. sa_predicate
is a
predicate handle for a predicate with arity 1. If no action is
provided the signal handling for this signal is restored to the default
before
PL_initialise()
was called.
Finally, 0 (zero) may be passed for sig. In that case the system allocates a free signal in the Prolog range (32 ... 64). Such signal handler are activated using PL_thread_raise().