12.4.16 Catching Signals (Software Interrupts)
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Foreign Language Interface
        • The Foreign Include File
          • Catching Signals (Software Interrupts)
            • PL_sigaction()
            • PL_signal()
            • PL_raise()
            • PL_handle_signals()
            • PL_get_signum_ex()
    • Packages
Availability:C-language interface function
int PL_handle_signals(void)
Handle any signals pending from PL_raise(). PL_handle_signals() is called at each pass through the call- and redo-port at a safe point. Exceptions raised by the handler using PL_raise_exception() are properly passed to the environment.

The user may call this function inside long-running foreign functions to handle scheduled interrupts. This routine returns the number of signals handled. If a handler raises an exception, the return value is -1 and the calling routine should return with FALSE as soon as possible.