Module Signal


module Signal: sig .. end
Treat UNIX signals as Ocaml exceptions.

exception Signal of int
Raised by Signal.signal_protect when a signal is delivered.
val signal_protect : int -> ?exn:exn -> (unit -> 'a) -> 'a
Call a thunk while delivering signals as exceptions. Signal.signal_protect n ~exn thunk calls thunk, handling signal n by throwing exception exn instead. If ?exn isn't given, it default to Signal n.