package devkit

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

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.