module Signal:Treat UNIX signals as Ocaml exceptions.sig
..end
exception Signal of int
Signal.signal_protect
when a signal is delivered.val signal_protect : int -> ?exn:exn -> (unit -> 'a) -> 'a
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
.