package devkit

  1. Overview
  2. Docs

Signal handling

libevent + signalfd

explicit interface (for compatibility)

type t
val stop : t -> unit

generic registration

val is_safe_output : unit -> bool
val set : int list -> (int -> unit) -> unit

add signal handler for specified signals

val set1 : int -> (unit -> unit) -> unit
val set_verbose : int list -> string -> (unit -> unit) -> unit
val set_exit : (unit -> unit) -> unit
val set_reload : (unit -> unit) -> unit
val replace : int list -> (int -> unit) -> unit

replace signal handler for specified signals

val setup_sys : unit -> unit

setup "standard" signal driver, deadlock-friendly, default

val setup_libevent : t -> unit

setup signals via libevent (signalfd), requires event loop

val setup_libevent_ : Devkit_core.Async.Ev.event_base -> unit
val setup_libevent' : t -> unit
val setup_lwt : unit -> unit

setup signals via lwt, requires Lwt_main.run

type state
val save : unit -> state
val restore : state -> unit
OCaml

Innovation. Community. Security.