devkit

Development kit - general purpose library
IN THIS PACKAGE
Module Devkit_core . Signal

libevent + signalfd

explicit interface (for compatibility)

type t
val init : Async.Ev.event_base -> t
val stop : t -> unit
val handle : t -> int list -> ( int -> unit ) -> unit
val handle_exit : t -> ( unit -> unit ) -> unit
val handle_reload : t -> ( unit -> unit ) -> unit

lwt

explicit interface (for compatibility)

val lwt_handle : int list -> ( unit -> unit ) -> unit
val lwt_handle_exit : ( unit -> unit ) -> unit
val lwt_handle_reload : ( unit -> unit ) -> 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_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_ : 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