package devkit

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

Install

Dune Dependency

Authors

Maintainers

Sources

1.2.tar.gz
sha256=28f4c68127579b86c5f50e01e444e8c51f0543bc5472c2dcac28993bc88aa756
md5=0317493fa5cc1054a882ceca59ce5992

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.