
get_interrupt_handler(+IntId, -PredSpec, -Module)

   Succeeds if PredSpec unifies with the specification of the current handler
for interrupt IntId and Module unifies with its home module.



Arguments
   IntId               Integer or atom.
   PredSpec            Term which unifies with atom/integer.
   Module              Atom or variable.

Type
   Event Handling

Description
   Provided IntId is a valid interrupt identifier, unifies PredSpec with
   the specification (i.e.  a term of the form name/arity) of the current
   handler for interrupt IntId, and Module with the module in which it is
   defined.

   The interrupts which exist are machine dependent.  The interrupts which
   can be caught or trapped are implementation defined.




Modes and Determinism
   get_interrupt_handler(+, -, -) is semidet

Fail Conditions
   Fails if no handler has been set for the interrupt IntId

Exceptions
     4 --- IntId is not instantiated.
     5 --- IntId is not an atom or integer.
     5 --- PredSpec does not unify with atom/integer.
     6 --- IntId is not a valid interrupt name or number.

Examples
   
Success:
      ?- get_interrupt_handler(18,M,N).
      M = pause/0
      N = sepia_kernel
      yes.

      ?- set_interrupt_handler(18,true/0), kill(0, 18),
      > get_interrupt_handler(18,true/0,sepia_kernel).
      yes.
Fail:
      get_interrupt_handler(16, true/0, sepia_kernel).
Error:
      get_interrupt_handler(N,true/0,sepia_kernel).   (Error 4).
      get_interrupt_handler(5.0,true/0,sepia_kernel). (Error 5).
      get_interrupt_handler(-1,X,sepia_kernel).       (Error 6).


See Also
   current_interrupt / 2, set_interrupt_handler / 2, kill / 2
