Module Funix.Signal

Signals

XXX. Just providing a bracket for now. Do direct style waiting.

type t = int

The type for signal numbers.

val set : t -> Stdlib.Sys.signal_behavior -> (Stdlib.Sys.signal_behavior, string) Stdlib.result

set s b is like Sys.signal but does not raise exceptions.

val set_noerr : t -> Stdlib.Sys.signal_behavior -> unit

set_noerr s b is like Sys.set_signal but ignores any error..

val with' : t -> Stdlib.Sys.signal_behavior -> (unit -> 'a) -> ('a, string) Stdlib.result

with' s b f sets s to b, calls f and restore the signal to its initial behaviour, however f returns. This is Error msg if setting up the signal failed.