package devkit

  1. Overview
  2. Docs
Development kit - general purpose library

Install

Dune Dependency

Authors

Maintainers

Sources

devkit-1.20210517.tbz
md5=00995ebead339d6ec1ba7859c3fc3a58
sha256=5ad39c7fa1a966a2f0a7f6dbb7e82c787439c73482f5f44b3c9fb54b040d36eb
sha512=8dd3f7d4aaabae9aa9ede13edee2b22214c0d2e2780bb08b2ca8ed588d74fc6d9b1908bb31dfee49c949c7cc425fb98897b8e0f11280070ebd99b965908ea133

doc/devkit.core/Devkit_core/Daemon/index.html

Module Devkit_core.DaemonSource

daemon utilities

Sourceval logfile : string option ref
Sourceval pidfile : string option ref
Sourceval runas : Unix.passwd_entry option ref
Sourceval foreground : bool ref
Sourceval managed : bool ref
Sourceval should_exit_ : bool ref

global flag indicating that process should exit, manage will automatically set this flag on SIGTERM unless default signal handling is overriden

Sourceval should_exit_lwt : unit Lwt.t

should_exit_lwt usage is discouraged. Use wait_exit instead, which makes it harder to ignore "should exit" state and loop infinitely

Sourceval signal_exit_lwt : unit Lwt.u

should_exit_lwt usage is discouraged. Use wait_exit instead, which makes it harder to ignore "should exit" state and loop infinitely

Sourceval should_exit : unit -> bool
Sourceval should_run : unit -> bool
Sourceexception ShouldExit

exception to be raised by functions that wish to signal premature termination due to !should_exit = true

Sourceval signal_exit : unit -> unit
Sourceval break : unit -> unit
  • raises ShouldExit

    if should_exit condition is set, otherwise do nothing

Sourceval wait_exit : unit -> 'a Lwt.t

wait until should_exit is set and raise ShouldExit

Sourceval break_lwt : unit -> unit Lwt.t

break_lwt = Lwt.wrap break

Sourceval unless_exit : 'a Lwt.t -> 'a Lwt.t

unless_exit x resolves promise x or raises ShouldExit

Sourceval get_args : unit -> (string * Arg.spec * string) list
Sourceval args : (string * Arg.spec * string) list
Sourceval install_signal_handlers : unit -> unit
Sourceval manage : unit -> unit
OCaml

Innovation. Community. Security.