Once a signal manager starts managing a signal, it never stops.
val create :
thread_safe_notify_signal_delivered:(unit -> unit) -> t
createcreates and returns a signal manager
t. Whenever a signal that
tis managing is delivered, it will call
thread_safe_notify_signal_deliveredfrom within the OCaml signal handler. Therefore
thread_safe_notify_signal_deliveredmust be thread safe.
val manage :
t -> Core.Std.Signal.t -> unit
manage t signalcauses
signal, thus overriding
default_sys_behaviorfor that signal, and any other OCaml handler for that signal.
val is_managing :
t -> Core.Std.Signal.t -> bool
is_managing t signalreturns true iff
manage t signalhas been called
install_handler t signals fcauses
tto manage the handling of
signals, and registers
fto run on every signal in
signalsthat is delivered. It is an error if
fever raises when it is called.
val install_handler :
t -> Core.Std.Signal.t list -> (Core.Std.Signal.t -> unit) -> handler
remove_handler handlercauses the particular
handlerto no longer handle the signals it was registered to handle. The signal manager continues to manage those signals, i.e. the OCaml signal handler remains installed, whether or not they still have handlers.
val handle_delivered :
t -> unit
handle_delivered truns all signal handlers on the signals that have been delivered but not yet handled.
val sexp_of_t :
t -> Sexplib.Sexp.t