package luv

  1. Overview
  2. No Docs
Binding to libuv: cross-platform asynchronous I/O

Install

Dune Dependency

Authors

Maintainers

Sources

luv-0.5.5.tar.gz
sha256=a81268ceb85b8cffbeb5e5a9fdb4c6e724266ce0dee1f39afc4bb4a17703d749
md5=5d2335fb57ffe228151cc492888ca2dc

doc/luv/Luv/Signal/index.html

Module Luv.SignalSource

Signals.

See Signals in the user guide and uv_signal_t — Signal handle in libuv.

Interface

Sourcetype t = [ `Signal ] Handle.t

Binds uv_signal_t.

Note that values of this type can be passed to functions in Luv.Handle, in addition to the functions in this module. In particular, see Luv.Handle.close.

Sourceval init : ?loop:Loop.t -> unit -> (t, Error.t) Result.result

Allocates and initializes a signal handle.

Binds uv_signal_init.

Sourceval start : t -> int -> (unit -> unit) -> (unit, Error.t) Result.result

Starts the signal handle.

Binds uv_signal_start.

See Signal numbers below for possible values of the integer argument.

Sourceval start_oneshot : t -> int -> (unit -> unit) -> (unit, Error.t) Result.result

Like Luv.Signal.start, but the handle is stopped after one callback call.

Binds uv_signal_start_oneshot.

Sourceval stop : t -> (unit, Error.t) Result.result

Stops the signal handle.

Binds uv_signal_stop.

Sourceval signum : t -> int

Evaluates to the signal number associated with the handle.

Binds uv_signal_t.signum.

Signal numbers

For the moment, the signals exposed are those that are both present on Unix and present or emulated by libuv on Windows. See Windows notes and Unix notes.

Note that these signal numbers do not, in general, match the ones in module Sys in the OCaml standard library.

val sigabrt : int
val sigfpe : int
val sighup : int
val sigill : int
val sigint : int
val sigkill : int
val sigsegv : int
val sigterm : int
val sigwinch : int
OCaml

Innovation. Community. Security.