package core

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Signal handlers.

type t
include Bin_prot.Binable.S with type t := t
val bin_size_t : t Bin_prot__.Size.sizer
val bin_write_t : t Bin_prot__.Write.writer
val bin_read_t : t Bin_prot__.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot__.Read.reader
val bin_shape_t : Bin_prot__.Shape.t
val bin_writer_t : t Bin_prot__.Type_class.writer
val bin_reader_t : t Bin_prot__.Type_class.reader
val bin_t : t Bin_prot__.Type_class.t
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Comparable.S with type t := t
include Base.Comparable.S with type t := t
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Base__.Or_error.t
type comparator_witness
val comparator : (t, comparator_witness) Base__Comparator.comparator
val validate_lbound : min:t Maybe_bound.t -> t Validate.check
val validate_ubound : max:t Maybe_bound.t -> t Validate.check
val validate_bound : min:t Maybe_bound.t -> max:t Maybe_bound.t -> t Validate.check
module Replace_polymorphic_compare : sig ... end
module Map : Map.S with type Key.t = t with type Key.comparator_witness = comparator_witness
module Set : Set.S with type Elt.t = t with type Elt.comparator_witness = comparator_witness
include Hashable.S with type t := t
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
val hashable : t Core__.Hashtbl.Hashable.t
module Table : Hashtbl.S with type key = t
module Hash_set : Hash_set.S with type elt = t
module Hash_queue : Hash_queue.S with type key = t
val of_string : string -> t
val equal : t -> t -> Base.Bool.t
val of_caml_int : Base.Int.t -> t

of_caml_int constructs a Signal.t given an OCaml internal signal number. This is only for the use of the Core_unix module.

val to_caml_int : t -> Base.Int.t
val to_string : t -> Base.String.t

to_string t returns a human-readable name: "sigabrt", "sigalrm", ...

type sys_behavior = [
  1. | `Continue
    (*

    Continue the process if it is currently stopped

    *)
  2. | `Dump_core
    (*

    Terminate the process and dump core

    *)
  3. | `Ignore
    (*

    Ignore the signal

    *)
  4. | `Stop
    (*

    Stop (suspend) the process

    *)
  5. | `Terminate
    (*

    Terminate the process

    *)
]

The behaviour of the system if a signal is received by a process. See include/linux/kernel.h in the Linux kernel source tree (not the file /usr/include/linux/kernel.h).

val sexp_of_sys_behavior : sys_behavior -> Sexplib0.Sexp.t
val sys_behavior_of_sexp : Sexplib0.Sexp.t -> sys_behavior
val __sys_behavior_of_sexp__ : Sexplib0.Sexp.t -> sys_behavior
val default_sys_behavior : t -> sys_behavior

Queries the default system behavior for a signal.

val handle_default : t -> Base.Unit.t

handle_default t is set t `Default.

val ignore : t -> Base.Unit.t

ignore t is set t `Ignore.

Specific signals, along with their default behavior and meaning.

val abrt : t

Dump_core Abnormal termination

val alrm : t

Terminate Timeout

val bus : t

Dump_core Bus error

val chld : t

Ignore Child process terminated

val cont : t

Continue Continue

val fpe : t

Dump_core Arithmetic exception

val hup : t

Terminate Hangup on controlling terminal

val ill : t

Dump_core Invalid hardware instruction

val int : t

Terminate Interactive interrupt (ctrl-C)

val kill : t

Terminate Termination (cannot be ignored)

val pipe : t

Terminate Broken pipe

val poll : t

Terminate Pollable event

val prof : t

Terminate Profiling interrupt

val quit : t

Dump_core Interactive termination

val segv : t

Dump_core Invalid memory reference

val sys : t

Dump_core Bad argument to routine

val stop : t

Stop Stop

val term : t

Terminate Termination

val trap : t

Dump_core Trace/breakpoint trap

val tstp : t

Stop Interactive stop

val ttin : t

Stop Terminal read from background process

val ttou : t

Stop Terminal write from background process

val urg : t

Ignore Urgent condition on socket

val usr1 : t

Terminate Application-defined signal 1

val usr2 : t

Terminate Application-defined signal 2

val vtalrm : t

Terminate Timeout in virtual time

val xcpu : t

Dump_core Timeout in cpu time

val xfsz : t

Dump_core File size limit exceeded

val zero : t

Ignore No-op; can be used to test whether the target process exists and the current process has permission to signal it

type pid_spec = [
  1. | `Use_Signal_unix
]
  • deprecated [since 2021-04] Use [Signal_unix]
type sigprocmask_command = [
  1. | `Use_Signal_unix
]
  • deprecated [since 2021-04] Use [Signal_unix]
val can_send_to : [ `Use_Signal_unix ]
  • deprecated [since 2021-04] Use [Signal_unix]
val of_system_int : [ `Use_Signal_unix ]
  • deprecated [since 2021-04] Use [Signal_unix]
val send : [ `Use_Signal_unix ]
  • deprecated [since 2021-04] Use [Signal_unix]
val send_exn : [ `Use_Signal_unix ]
  • deprecated [since 2021-04] Use [Signal_unix]
val send_i : [ `Use_Signal_unix ]
  • deprecated [since 2021-04] Use [Signal_unix]
val sexp_of_pid_spec : [ `Use_Signal_unix ]
  • deprecated [since 2021-04] Use [Signal_unix]
val sigpending : [ `Use_Signal_unix ]
  • deprecated [since 2021-04] Use [Signal_unix]
val sigprocmask : [ `Use_Signal_unix ]
  • deprecated [since 2021-04] Use [Signal_unix]
val sigsuspend : [ `Use_Signal_unix ]
  • deprecated [since 2021-04] Use [Signal_unix]
val to_system_int : [ `Use_Signal_unix ]
  • deprecated [since 2021-04] Use [Signal_unix]
module Expert : sig ... end

The Expert module contains functions that novice users should avoid, due to their complexity.

module Stable : sig ... end
OCaml

Innovation. Community. Security.