As noted above it is not possible to call e.g.
SP_event() from an arbitrary signal handler. That is, from
signal handlers installed with
sigaction. Instead you need to install the signal handler using
When the OS delivers a signal
sig for which
SP_signal(sig,func,user_data) has been called SICStus will not call
func immediately. Instead the call to
func will be delayed
until it is safe for Prolog to do so, in much the same way that functions
SP_event() are handled (this is an incompatible change
as of release 3.9).
Since the signal handling function
func will not be called
immediately upon delivery of the signal to the process it only makes
sense to use
SP_signal() to handle certain asynchronous signals
asynchronous signals handled specially by the OS, such as
are not suitable for handling via
SP_signal(). Note that the
development system installs a handler for ‘SIGINT’, and, under
Windows, ‘SIGBREAK’, to catch keyboard interrupts.
As of release 4.4,
library(timeout) no longer uses any signals.
func is called, it cannot call any SICStus API functions
SP_event(). Note that
func will be called in the