|Did you know ...||Search Documentation:|
|Notes on signal handling|
Before deciding to deal with signals in your application, please consider the following:
throware unsafe. Handlers defined to call a predicate are safe. Note that the predicate can call throw/1, but the delivery is delayed until Prolog is in a safe state.
The C-interface described in section
12.4.17 provides the option
PL_SIGSYNC to select either safe synchronous or unsafe
throwor a foreign handler, signals are delivered immediately (as defined by the OS). When using a Prolog predicate, delivery is delayed to a safe moment. Blocking system calls or foreign loops may cause long delays. Foreign code can improve on that by calling PL_handle_signals().
Signals are blocked when the garbage collector is active.