Module Async_unix.Signal
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
type t= Core.Signal.t
val bin_size_t : t Bin_prot.Size.sizerval bin_write_t : t Bin_prot.Write.writerval bin_read_t : t Bin_prot.Read.readerval __bin_read_t__ : (int -> t) Bin_prot.Read.readerval bin_shape_t : Bin_prot.Shape.tval bin_writer_t : t Bin_prot.Type_class.writerval bin_reader_t : t Bin_prot.Type_class.readerval bin_t : t Bin_prot.Type_class.tval t_of_sexp : Sexplib0.Sexp.t -> tval sexp_of_t : t -> Sexplib0.Sexp.tval (>=) : t -> t -> boolval (<=) : t -> t -> boolval (=) : t -> t -> boolval (>) : t -> t -> boolval (<) : t -> t -> boolval (<>) : t -> t -> boolval min : t -> t -> tval max : t -> t -> tval ascending : t -> t -> intval descending : t -> t -> intval between : t -> low:t -> high:t -> boolval clamp_exn : t -> min:t -> max:t -> tval clamp : t -> min:t -> max:t -> t Base.Or_error.t
type comparator_witness= Core__Signal.comparator_witness
val comparator : (t, comparator_witness) Base.Comparator.comparatorval validate_lbound : min:t Base.Maybe_bound.t -> t Base.Validate.checkval validate_ubound : max:t Base.Maybe_bound.t -> t Base.Validate.checkval validate_bound : min:t Base.Maybe_bound.t -> max:t Base.Maybe_bound.t -> t Base.Validate.check
module Replace_polymorphic_compare : sig ... endmodule Map : sig ... endmodule Set : sig ... endval compare : t -> t -> Core_kernel__.Import.intval hash_fold_t : Base.Hash.state -> t -> Base.Hash.stateval hash : t -> Base.Hash.hash_valueval hashable : t Core_kernel.Hashtbl.Hashable.t
module Table : sig ... endmodule Hash_set : sig ... endmodule Hash_queue : sig ... endval of_string : string -> tval equal : t -> t -> boolval of_system_int : int -> tval to_system_int : t -> intval of_caml_int : int -> tval to_caml_int : t -> intval to_string : t -> string
val sexp_of_sys_behavior : sys_behavior -> Ppx_sexp_conv_lib.Sexp.tval sys_behavior_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> sys_behaviorval __sys_behavior_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> sys_behaviorval default_sys_behavior : t -> sys_behaviorval handle_default : t -> unitval ignore : t -> unit
type pid_spec=[|`Group of Core__.Import.Pid.t|`My_group|`Pid of Core__.Import.Pid.t]
val sexp_of_pid_spec : pid_spec -> Ppx_sexp_conv_lib.Sexp.tval send : t -> pid_spec -> [ `No_such_process | `Ok ]val send_i : t -> pid_spec -> unitval send_exn : t -> pid_spec -> unitval can_send_to : Core__.Import.Pid.t -> bool
val sigprocmask : sigprocmask_command -> t list -> t listval sigpending : unit -> t listval sigsuspend : t list -> unitval abrt : tval alrm : tval bus : tval chld : tval cont : tval fpe : tval hup : tval ill : tval int : tval kill : tval pipe : tval poll : tval prof : tval quit : tval segv : tval sys : tval stop : tval term : tval trap : tval tstp : tval ttin : tval ttou : tval urg : tval usr1 : tval usr2 : tval vtalrm : tval xcpu : tval xfsz : tval zero : t
module Stable : sig ... endval handle_default : [ `Do_not_use_with_async ] -> _We override values from
Core.Signalthat we don't want people to use with Async.
val ignore : [ `Do_not_use_with_async ] -> _val handle : ?stop:unit Async_unix__.Import.Deferred.t -> t list -> f:(t -> unit) -> unithandle ?stop signals ~farranges so that whenever a signal insignalsis delivered,fis called on that signal. Iffraises, then an exception will be raised to the monitor in effect whenhandlewas called.Multiple calls to
handlewith the same signal will cause all the handlers to run when that signal is delivered, not just the last handler from the last call tohandle.The first time
handleis 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 listterminatingis a list of signals that can be supplied tohandleand whose default behavior is to terminate the program:alrm hup int term usr1 usr2.Various signals whose
default_sys_behavioris`Terminateare 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 -> boolis_managed_by_async signalreturns true iffsignalis being managed by Async, and hence its default behavior is no longer in effect.