Module TermLib.Signals

Gathers signal related stuff.

val pp_print_signals : Stdlib.Format.formatter -> unit -> unit

Pretty printer for signal info.

val ignore_sigalrm : unit -> unit

Sets the handler for sigalrm to ignore.

val ignoring_sigalrm : (unit -> 'a) -> 'a

Runs something while ignoring sigalrm.

val ignore_sigint : unit -> unit

Sets the handler for sigint to ignore.

val ignore_sigquit : unit -> unit

Sets the handler for sigquit to ignore.

val ignore_sigterm : unit -> unit

Sets the handler for sigterm to ignore.

val ignore_sigpipe : unit -> unit

Sets the handler for sigpipe to ignore.

val set_sigalrm_timeout : unit -> unit

Sets a timeout handler for sigalrm.

val set_sigalrm_exn : unit -> unit

Sets an exception handler for sigalarm.

val set_sigint : unit -> unit

Sets a handler for sigint.

val set_sigquit : unit -> unit

Sets a handler for sigquit.

val set_sigterm : unit -> unit

Sets a handler for sigterm.

val set_sigpipe : unit -> unit

Sets a handler for sigpipe.

val set_timeout : float -> unit

Sets a timeout.

val set_sigalrm_timeout_from_flag : unit -> unit

Sets a timeout based on the flag value and the total time elapsed this far. If no timeout is specified, set an exception handler for sigalrm.

val unset_timeout : unit -> unit

Deactivates timeout.

val catch_break : bool -> unit

Raise exception on ctrl+c if true.