Signal handling.
To discourage use of the Signal.Expert
module, we hide it here. People can use
Core.Signal.Expert
if they need.
include module type of Core.Signal with type Signal.t = Core.Signal.t with module Signal.Expert := Core.Signal.Expert
val bin_t : t Bin_prot.Type_class.t
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int ‑> t) Bin_prot.Read.reader
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_shape_t : Bin_prot.Shape.t
val t_of_sexp : Base.Sexp.t ‑> t
val sexp_of_t : t ‑> Base.Sexp.t
val clamp : t ‑> min:t ‑> max:t ‑> t Base.Or_error.t
val comparator : (t, comparator_witness) Base.Comparator.comparator
val validate_lbound : min:t Base.Maybe_bound.t ‑> t Base.Validate.check
val validate_ubound : max:t Base.Maybe_bound.t ‑> t Base.Validate.check
val validate_bound : min:t Base.Maybe_bound.t ‑> max:t Base.Maybe_bound.t ‑> t Base.Validate.check
module Replace_polymorphic_compare : sig ... end
module Map : sig ... end
module Set : sig ... end
val compare : t ‑> t ‑> Core_kernel__.Import.int
val hash_fold_t : Base.Hash.state ‑> t ‑> Base.Hash.state
val hash : t ‑> Base.Hash.hash_value
val hashable : t Core_kernel.Hashtbl.Hashable.t
module Table : sig ... end
module Hash_set : sig ... end
module Hash_queue : sig ... end
val of_string : string ‑> t
val of_system_int : int ‑> t
val to_system_int : t ‑> int
val of_caml_int : int ‑> t
val to_caml_int : t ‑> int
val to_string : t ‑> string
val sys_behavior_of_sexp : Base.Sexp.t ‑> sys_behavior
val __sys_behavior_of_sexp__ : Base.Sexp.t ‑> sys_behavior
val sexp_of_sys_behavior : sys_behavior ‑> Base.Sexp.t
val default_sys_behavior : t ‑> sys_behavior
val handle_default : t ‑> unit
val ignore : t ‑> unit
val sexp_of_pid_spec : pid_spec ‑> Base.Sexp.t
val can_send_to : Core__.Import.Pid.t ‑> bool
val sigprocmask : sigprocmask_command ‑> t list ‑> t list
val sigpending : unit ‑> t list
val sigsuspend : t list ‑> unit
val abrt : t
val alrm : t
val bus : t
val chld : t
val cont : t
val fpe : t
val hup : t
val ill : t
val int : t
val kill : t
val pipe : t
val poll : t
val prof : t
val quit : t
val segv : t
val sys : t
val stop : t
val term : t
val trap : t
val tstp : t
val ttin : t
val ttou : t
val urg : t
val usr1 : t
val usr2 : t
val vtalrm : t
val xcpu : t
val xfsz : t
val zero : t
module Stable : sig ... end
val handle_default : [ `Do_not_use_with_async ] ‑> _
We override values from Core.Signal
that we don't want people to use with
Async.
val handle : ?stop:unit Async_unix__.Import.Deferred.t ‑> t list ‑> f:(t ‑> unit) ‑> unit
handle ?stop signals ~f
arranges so that whenever a signal in signals
is
delivered, f
is called on that signal. If f
raises, then an exception will be
raised to the monitor in effect when handle
was called.
Multiple calls to handle
with the same signal will cause all the handlers to run
when that signal is delivered, not just the last handler from the last call to
handle
.
The first time handle
is called for a signal, it will install a C signal handler for
it, replacing the existing C signal handler for that signal.
val terminating : t list
terminating
is a list of signals that can be supplied to handle
and whose default
behavior is to terminate the program: alrm hup int term usr1 usr2
.
Various signals whose default_sys_behavior
is `Terminate
are not included:
| kill | it's not allowed to be handled | | pipe | Async already ignores this signal, since it handles EPIPE | | prof | so that we can profile things with -p | | vtalrm | it already has a handler |
val is_managed_by_async : t ‑> bool
is_managed_by_async signal
returns true iff signal
is being managed by Async, and
hence its default behavior is no longer in effect.